laravel get auth user id
snippet in php

laravel auth user_id

user5674

$userId = Auth::id();

laravel get auth user id

user3596

// Get the currently authenticated user's ID...
$id = Auth::id();