set custom auth user in laravel loging code example
Example 1: laravel auth user_id
$userId = Auth::id();
Example 2: laravel setup auth
// Laravel 5.x
php artisan make:auth
$userId = Auth::id();
// Laravel 5.x
php artisan make:auth