PHP code example of geggleto / psr7-permission

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

    

geggleto / psr7-permission example snippets



// In Slim 3

$permission = new Geggleto\Service\Permission($container['system_routes']);
// This will add the permission middleware to the entire site. 
// This is not likely what you want since non-logged in users will not be able to access anything.
$app->add($permission);