PHP code example of uwdoem / aliro

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

    

uwdoem / aliro example snippets


$aliro_settings = array(
    'permissions' => array(
        '/post/{name}' => ['u_bonifacp_test_user', 'u_bonifacp_test_admin'],
        '/admin/{name}' => ['u_bonifacp_test_admin']
    )
);

$app = new \Slim\App(...);

$app->add(new Aliro($aliro_settings));

$aliro_settings = array(
    'permissions' => array(
        '/post/{name}' => ['u_bonifacp_test_user', 'u_bonifacp_test_admin'],
        '/admin/{name}' => ['u_bonifacp_test_admin']
    ),
    'deniedHandler' => null
);

$app = new \Slim\App(...);

$app->add(new Aliro($aliro_settings));