get auth details in laravel

use App\Models\User;
use Auth;

if (Auth::check()) {
$user = Auth::user();
$user_id = $user->id;
}


Leave a Reply