Obtenir l'identifiant de connexion 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