mercredi 12 décembre 2018

how to Implement logout functionality in laravel

without login If I give any URL's in the admin panel it is opening. How to solve it?

while login I am using,

$request->session()->put('userId', $user->userId);

In logout I am using,

$request->session()->forget('userId');

Route file,

Route::get('/addModule', function () {
    return view('addModule');
});

How can I redirect to login screen. while am calling any admin panel URL's.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire