find in auth laravel code example
Example 1: laravel get auth user id
// Get the currently authenticated user's ID...
$id = Auth::id();
Example 2: laravel check auth
use Illuminate\Support\Facades\Auth;
if (Auth::check()) {
// The user is logged in...
}