• 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

How to access a var with "-" in PHP [duplicate]

Respond with status code 401 on authentication failure using Laravel and Passport?

How to delete old images from public folder on update using Laravel

Laravel 5.2: Unable to locate factory with name [default]

Show date difference as "20" instead of "20 years ago"

find in set in laravel ? example

How to insert data from multiple select dropdown values into database?

Get orders by date and status woocommerce

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

array_key_exists(): The first argument should be either a string or an integer

PHP Warning: Module already loaded in Unknown on line 0

Unit (real unit test) of test laravel relationship

Converting alphabet letter to alphabet position in PHP [duplicate]

How to submit a form when page loads using JavaScript?

PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll

About Contact Privacy policy Terms and conditions