Answer the question
In order to leave comments, you need to log in
How to check for the presence of a session and redirect to a specific page in its absence?
Tell. I have an admin. /login page. After successful authorization I create a session Session::put('login', $userData['login']);
Maybe not correctly somehow. In general, I need that after successful authorization, the user, firstly, was transferred to the main one. And if no session was found when opening any pages of the admin panel, then throw it on the /login.
Answer the question
In order to leave comments, you need to log in
Session::has, although Auth::check() or Auth::guest() are more correct
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question