laravel auth user logged code example
Example 1: get logged user id laravel
$id = Auth::user()->id;print_r($id);
Example 2: laravel setup auth
// Laravel 5.x
php artisan make:auth
$id = Auth::user()->id;print_r($id);
// Laravel 5.x
php artisan make:auth