PHP code example of koperdog / yii2-sitemanager

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

    

koperdog / yii2-sitemanager example snippets


...
'components' => [
    // ...
    'settings' => [
        'class' => 'koperdog\yii2sitemanager\components\Settings',
    ],
    // ...
]
... 

...
'bootstrap' => ['settings'],
...

'modules' => [
    'manager' => [
        'class' => 'koperdog\yii2sitemanager\Module',
    ],
],

php yii migrate --migrationPath=@vendor/koperdog/yii2-sitemanager/migrations

\Yii::$app->params['setting_name'];

\Yii::$app->settings->get('setting_name');

// ...
'rules' => [
    'manager' => 'manager/default/index',
    'manager/<controller:domains|languages>/<action:\w+>' => 'manager/<controller>/<action>',
    'manager/<controller:domains|languages>' => 'manager/<controller>/index',
    'manager/<action:\w+>' => 'manager/default/<action>',
],
// ...

php composer.phar