• 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

Override default Auth routes in Laravel 7

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null

how to see if database exists with PDO [duplicate]

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

How to Create WooCommerce Subscription Product via. REST API?

correct PHP headers for pdf file download

Laravel Nova Dependency Container what are the allowed resource properties other than id in dependsOn

Submitting a form with ajax in Wordpress

Unable to create lockable file - Laravel 8 & PHP 8

html-php form submission after validation through JavaScript [closed]

Detect if PHP session exists

PHPS source file - 403 Forbidden You don't have permission to access this resource

Install mysql client in docker image

laravel automatically deletes server.php on php artisan serve

Trying to iterate over a mongodb cursor twice - failing

About Contact Privacy policy Terms and conditions