laravel auth route namespace code example
Example 1: get id user login laravel
use Auth;
$user_id = Auth::user()->id;
Example 2: laravel auth
//laravel 8.x
//for bootstrap scafolding
php artisan ui bootstrap --auth
use Auth;
$user_id = Auth::user()->id;
//laravel 8.x
//for bootstrap scafolding
php artisan ui bootstrap --auth