PHP code example of niro / rbac-backend

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

    

niro / rbac-backend example snippets


Route::post('auth/login', [C\Auth\LoginController::class, 'login'])->name('login');

'connections' => [
    ...
        'mongodb' => [
            'driver' => 'mongodb',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', 27017),
            'database' => env('DB_DATABASE', 'chatbot'),
            'username' => env('DB_USERNAME', ''),
            'password' => env('DB_PASSWORD', ''),
            'options' => [
                // here you can pass more settings to the Mongo Driver Manager
                // see https://www.php.net/manual/en/mongodb-driver-manager.construct.php under "Uri Options" for a list of complete parameters that you can use

                // 'database' => env('DB_AUTHENTICATION_DATABASE', 'admin'), //