auth::guard laravel code example
Example 1: laravel make auth
Laravel's laravel/ui package provides a quick way to scaffold all of the routes and views you need for authentication using a few simple commands:
composer require laravel/ui
php artisan ui vue --auth
Example 2: laravel setup auth
php artisan make:auth
Example 3: laravel auth
use Illuminate\Support\Facades\Auth;
Example 4: laravel guard
They arere the definition of how the system should store and retrieve
]information about your users.
You can find the configuration in your config/auth.php
https:
https:
Example 5: where is the guard setting in laravel
You have to also register the guard in the config\auth.php
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
'admin' => [
'driver' => 'session',
'provider' => 'admins',
],
],