construct get auth user id in laravel code example
Example 1: get id user login laravel
use Auth;
$user_id = Auth::user()->id;
Example 2: laravel auth
// Laravel 5.x
php artisan make:auth
use Auth;
$user_id = Auth::user()->id;
// Laravel 5.x
php artisan make:auth