Have you used this in your controller function and you can access the 'auth' session,By adding top of your controller functions.
public function __construct()
{
$this->middleware('auth');
}
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I have facing one issue in laravel 5.6 Auth.
First time user login into system using auth::attempt() successfully and same that page auth::check() return 1 but after redirecting into other page or url , not getting login user detail or auth::check() not return any data.
Any one help me for solving this issue.
Please or to participate in this conversation.