$id = Auth::user()->id;print_r($id);
$user = auth()->user(); print($user->id);print($user->name);print($user->email);
Auth::user()->name
{{Auth::user()->username}}
$userId = Auth::id();
// Get the currently authenticated user's ID...
$id = Auth::id();
Auth::user();
use IlluminateSupportFacadesAuth;
// Retrieve the currently authenticated user...
$user = Auth::user();
// Retrieve the currently authenticated user's ID...
$id = Auth::id();
auth()->id()
use Auth;
//find auth
function __construct()
{
$this->middleware('auth');
}
//end find auth
Route::get('/flights', function () {
// Only authenticated users may access this route...
})->middleware('auth:admin');