PHP code example of mix8872 / yii2-user-admin

1. Go to this page and download the library: Download mix8872/yii2-user-admin 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/ */

    

mix8872 / yii2-user-admin example snippets


return [
    'modules' => [
        'user-admin' => [
            'class' => 'mix8872\useradmin\Module',
            ...
        ]
        ...
    ],
    ...
    'as access' => [
        'class' => 'mix8872\useradmin\components\AccessControl',
        'allowActions' => [
            'site/*',
            'admin/*',
            'some-controller/some-action',
            // The actions listed here will be allowed to everyone including guests.
            // So, 'admin/*' should not appear here in the production, of course.
            // But in the earlier stages of your development, you may probably want to
            // add a lot of actions here until you finally completed setting up rbac,
            // otherwise you may not even take a first step.
        ]
    ],
];

php composer.phar