• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Clients authentication and user authentication with laravel

phplaraveloauth-2.0


PHP Snippet 1:

 'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'users',
    ],

    'api' => [
        'driver' => 'passport',
        'provider' => 'users'
        // 'hash' => false,
    ],

    // Guard For Customer 

     'custome_api' => [
        'driver' => 'passport',
        'provider' => 'customers'
    ],
],

PHP Snippet 2:

'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => App\Models\User::class,
    ],

     'customers' => [
        'driver' => 'eloquent',
       'model' => App\Models\Customer::class,
    ],
],

Related Snippets

Laravel/docker-compose/redis - Class 'Redis' not found

merging two arrays with specified index

Insert And Retrieve Data in MySQL with $.post Noob Question

Nginx disallowing execution of PHP in uploads directory with Magento

Using spatie/media-library, how to rename a collection of uploaded files?

how to display a view on laravel 8 and not have a 404 NOT FOUND page?

Laravel: Create morphs() relationship nullable

Webscraping Symfony/Panther: Can't get HTML

How to give apache permission to write to home directory?

Laravel/ PHP: Order By Alphabetical with numbers in order [duplicate]

Stop caching for PHP 5.5.3 in MAMP

Laravel Sanctum CSRF not authenticating

Laravel PackageManifest.php: Undefined index: name

Laravel insert dynamic input values with radio button

Login if user is active using Laravel Breeze

About Contact Privacy policy Terms and conditions