how to login a user after registering laravel code example
Example 1: how login one user with id in laravel
public function manualLogin(){
$user = User::find(1);
Auth::login($user);
return redirect('/');
}
///////////////////////////////////////////////////////////////
// or
Auth::logout();
Example 2: laravel add user
php artisan tinker
DB::table('users')->insert(['name'=>'MyUsername','email'=>'[email protected]','password'=>Hash::make('123456')])