PHP code example of zoutapps / laravel-backpack-multiauth

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

    

zoutapps / laravel-backpack-multiauth example snippets


public function register()
{
	if ($this->app->environment() == 'local') {
		$this->app->register(ZoutApps\LaravelBackpackAuth\AuthServiceProvider::class);
	}
}

/**
 * Get the path that we should redirect once logged out.
 * Adaptable to user needs.
 *
 * @return string
 */
public function logoutToPath() {
    return '/';
}

php artisan zoutapps:multiauth {singular_lowercase_name_of_guard}

// Examples
php artisan zoutapps:multiauth admin
php artisan zoutapps:multiauth employee
php artisan zoutapps:multiauth customer

php artisan zoutapps:roleauth {singular_lowercase_name_of_guard}

// Examples
php artisan zoutapps:roleauth admin
php artisan zoutapps:roleauth employee
php artisan zoutapps:roleauth customer

php artisan zoutapps:backpack:multiauth {singular_lowercasae_name_of_guard}

// Example
php artisan zoutapps:backpack:multiauth administrator

php artisan zoutapps:backpack:roleauth {singular_lowercasae_name_of_guard} {exact_role_name}

// Example
php artisan zoutapps:backpack:multiauth administrator

php artisan zoutapps:multiauth admin --domain
php artisan zoutapps:multiauth employee --domain
php artisan zoutapps:multiauth customer --domain

php artisan migrate

php artisan zoutapps:multiauth admin --model

php artisan zoutapps:multiauth admin --views

php artisan zoutapps:multiauth admin --routes