PHP code example of chrisreedio / bastion

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

    

chrisreedio / bastion example snippets


$panel
    ->plugins([
        // ... Other Plugins
        \ChrisReedIO\Bastion\BastionPlugin::make(),
    ])

return [
    'models' => [
        'permission' => \Spatie\Permission\Models\Permission::class,
        'role' => \Spatie\Permission\Models\Role::class,
        'user' => '\App\Models\User',
    ],

    'permissions' => [
        'preload' => true,

    ],

    'default_guard' => 'web',
    'guards' => [
        // value => 'Custom Label'
        'web' => 'Web',
        'api' => 'API',
        // Your other custom guards here
    ],

    'sso' => [
        'enabled' => false,
    ],
];

$panel
    ->plugins([
        // ... Other Plugins
        \ChrisReedIO\Bastion\BastionPlugin::make()
            ->superAdminRole('Developer'),
	])
bash
php artisan vendor:publish --tag="bastion-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="bastion-config"
bash
php artisan vendor:publish --tag="bastion-seeders"
bash
php artisan vendor:publish --tag="bastion-views"