Closed andrewpros closed 9 years ago
If you do 'blocked' => [Auth::check()]
in the config that doesn't work ?
Haven't tested it till now, coz, when you use kickstarter the code clearly shows that it doesn't even load config.
There is also problem with this, if someone go to page, cache is created, but then he log in, the cache show non logged in page, so i clearly need a way to check login status, but...
If i use kickstarter in autoload.php it won't work, so i'm looking for a solution.
Going back to your question, adding Auth::check to blockers array in config just gets me a long, long error...
Please keep in mind, i'm using the kickstarter method, laravel has a very very low performance, so i need to use it.
Ah yeah no yeah confused with something else. I think I did that once, checking auth during kickstart, by checking the cookie or session or something but I'm not sure that still works on 4.2
It might be too late to help, but I just got this working.
In the config.php file you need to put: 'blockers' => array(Auth::guest()),
Then have your Laravel app create a new cookie on login (and delete on logout). You can then use the following code in autoload.php:
if (!isset($_COOKIE["cookiename"])) { require DIR.'/../vendor/anahkiasen/flatten/src/Flatten/Flatten.php'; Flatten\Flatten::kickstart(); }
Can someone tell me how to use kickstarter method, but only for non logged in users?
The issue is that with kickstarter it doesn't check the config and as it don't use laravel there is no simple way to Auth::check()
Can someone help me with this?