I need authenticate a user from my controller.
public function index()
{
$user = User::find(1);
Auth::login($user, true);
dd(Auth::check()); // returns true
}
public function dev()
{
dd(Auth::check()); // returns false
}
When I run index() that's ok. Script returns true. But next when I go to dev() - scripts returns false.
I tried with diferrent session drivers (file, cookie, database).
via Markx