PHP code example of simple-yii2 / user

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

    

simple-yii2 / user example snippets


return [
    // ...
    'components' => [
        'authManager' => [
            'class' => 'yii\rbac\DbManager',
        ],
        // ...
    ],
];

return [
    // ...
    'modules' => [
        'user' => 'user\backend\Module',
        // ...
    ],
];

return [
    // ...
    'components' => [
        'user' => [
            'class' => 'user\common\components\User',
            'identityClass' => 'user\common\models\User',
            'loginUrl' => ['user/login/index'],
        ],
        // ...
    ],
];