Auth user detail in laravel

Auth user detail in laravel

<?php

$id = Auth::user()->id;

echo auth()->user()->id;

echo auth()->user()->role;

echo $id;

?>

Leave a Reply