PHP code example of autoluminescent / multiauth

1. Go to this page and download the library: Download autoluminescent/multiauth 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/ */

    

autoluminescent / multiauth example snippets





return [

    /*
    |--------------------------------------------------------------------------
    | Multiauth Guards
    |--------------------------------------------------------------------------
    | Here you can define guards for seperate segments / domains
    */

    'guards' => [

        /*
        |--------------------------------------------------------------------------
        | Default Web Guard
        |--------------------------------------------------------------------------
        | This is the default web guard and is active for all routes except for
        | the other guard routes you define.
        |
        */

        'web' => [

            /*
            | Web guard domain should be empty.
            */
            'domain' => '',

            /*
            | Prefix for auth routes
            | Example: http://example.test/auth
            */
            'prefix' => 'auth',
            'redirect_after_login' => '/home',
            'guard_driver' => 'session',
            'provider_driver' => 'eloquent',
            'user_model' => \Autoluminescent\Multiauth\User::class,
            'password_reset_table' => 'password_resets',
            'password_reset_expires' => 60,
            'allow_registration' => true

        ],

        'admin' => [
            'domain' => 'admin',
            'prefix' => 'admin/auth',
            'redirect_after_login' => '/admin',
            'guard_driver' => 'session',
            'provider_driver' => 'eloquent',
            'user_model' => \Autoluminescent\Multiauth\User::class,
            'password_reset_table' => 'password_resets',
            'password_reset_expires' => 60,
            'allow_registration' => false,
            
            // You can replace the layout and other blade views with your custom views.
            'views' => [
				'layout' => 'multiauth::layouts.auth',
				'login' => 'multiauth::login',
			],
        ],

    ],

];


sh
php artisan multiauth:install