PHP code example of chweb / multi-auth

1. Go to this page and download the library: Download chweb/multi-auth library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

chweb / multi-auth example snippets


'guards' => [
    'admin' => [
        'driver' => 'session',
        'provider' => 'admins',
    ],
],

'providers' => [
    'admins' => [
        'driver' => 'eloquent',
        'model' => App\Models\Admin::class,
    ],
],

->withRouting(
    // ...
    then: function () {
        Route::middleware('web')
            ->group(base_path('routes/admin.php'));
    },
)

use Chweb\MultiAuth\MultiAuthServiceProvider;
echo MultiAuthServiceProvider::VERSION;
bash
php artisan multi-auth:install admin
bash
php artisan multi-auth:install {guard-name}