Answers for "session out specific user in laravel"

PHP
2

set session after login with laravel

$user = Auth::User();
    Session::put('user', $user);
    $user=Session::get('user');
    return $user->name;
Posted by: Guest on October-20-2020
0

laravel one session per user

Firstly uncomment out the:

\Illuminate\Session\Middleware\AuthenticateSession::class, line from App\Http Kernel.php class.

Secondly add this line in your login controller function just after login attempt successfully and before redirection: \Auth::logoutOtherDevices(request('password'));
Posted by: Guest on July-03-2021

Code answers related to "session out specific user in laravel"

Browse Popular Code Answers by Language