PHP code example of net-code / laravel-access

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

    

net-code / laravel-access example snippets


$authorizer->can($userId, Permission::InvoicesIssue, $tenantId);   // host enum, typed
Route::post('/invoices', IssueInvoiceController::class)->middleware('permission:invoices.issue');