how login works in laravel code example
Example 1: laravel auth namespace
use Illuminate\Support\Facades\Auth;
Example 2: laravel setup auth
// Laravel 5.x
php artisan make:auth
Example 3: laravel force login by id
Auth::login($user);
use Illuminate\Support\Facades\Auth;
// Laravel 5.x
php artisan make:auth
Auth::login($user);