Obtener ID de inicio de sesión del usuario Laravel
use Auth;
$user_id = Auth::user()->id;
Innocent Ibis
use Auth;
$user_id = Auth::user()->id;
public function manualLogin(){
$user = User::find(1);
Auth::login($user);
return redirect('/');
}
///////////////////////////////////////////////////////////////
// or
Auth::logout();
Auth::loginUsingId(1, true);//The true is optional, set to "remember" the given user...
or
$user = User::find($user_id);
Auth::login($user);
composer require laravel/ui "^2.0"
composer require laravel/ui