I have a project on "somepage.com" and when I join to my page, always I see again the login form, I want to check when I go back to "somepage.com" if previously I logged on the page I want to go to /admin
or /sales
and If I not logged go to /
Laravel 5.8
if you want to check manually, you can use Auth::check() this will return if the session is active.
In your controller before rendering the view code will look somewhat like this:
if (Auth::check()) {
// return redirect as you wish.
}
// return redirect to login page.
don't forget to use Illuminate\Support\Facades\Auth;