PHP code example of deegitalbe / laravel-trustup-io-authentification

1. Go to this page and download the library: Download deegitalbe/laravel-trustup-io-authentification 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/ */

    

deegitalbe / laravel-trustup-io-authentification example snippets


'roles' => [
    'Super Admin',
    'Employee',
    'Translator'
],

'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'users',
        'driver' => 'trustup.io',
    ],
    'api' =>[
        'driver' => 'trustup.io'
    ]
],

use Illuminate\Support\Facades\Route;
use Deegitalbe\LaravelTrustupIoAuthentification\Http\Middleware\TrustUpIoAuthMiddleware;

Route::middleware(TrustUpIoAuthMiddleware::class)->group(function() {
    // Your restricted routes ...
});

Route::middleware(TrustUpIoAuthMiddleware::class.':Super Admin|Translator')->group(function() {
    // Your restricted routes only accessible by super admins or translators ...
});