find Auth id laravel code example
Example 1: get id user login laravel
use Auth;
$user_id = Auth::user()->id;
Example 2: laravel check auth
use Illuminate\Support\Facades\Auth;
if (Auth::check()) {
// The user is logged in...
}
use Auth;
$user_id = Auth::user()->id;
use Illuminate\Support\Facades\Auth;
if (Auth::check()) {
// The user is logged in...
}