how to add auth in laravel code example
Example 1: laravel auth user_id
$userId = Auth::id();
Example 2: laravel auth
//namespace
use Illuminate\Support\Facades\Auth;
Example 3: laravel force login by id
Auth::login($user);
$userId = Auth::id();
//namespace
use Illuminate\Support\Facades\Auth;
Auth::login($user);