{{ auth()->user()->email }}
{{Auth::user()->username}}
$userId = Auth::id();
// Get the currently authenticated user's ID...
$id = Auth::id();
composer require laravel/ui
php artisan ui vue --auth
npm install && npm run dev
Auth::user();
//Typical way:
@if(auth()->user())
// The user is authenticated.
@endif
//Shorter:
@auth
// The user is authenticated.
@endauth
//namespace
use IlluminateSupportFacadesAuth;
use IlluminateSupportFacadesAuth;
Auth::login($user);
Route::get('/flights', function () {
// Only authenticated users may access this route...
})->middleware('auth:admin');