PHP code example of fgh151 / yii2-backup

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

    

fgh151 / yii2-backup example snippets


        'bootstrap' => ['backup'],
        'modules' => [
                'backup' => [
                    'class' => 'fgh151\modules\backup\Module',
                    'path' => '@backend/_backup/' //path alias of backup dir
                ]
            ],
        

php composer.phar 
config/web.php
[backend|frontend|common]/config/main.php

        'modules'    => [
             'backup' => [
                 'class' => 'fgh151\modules\backup\Module',
                 'as access' => [
                     'class' => 'yii\filters\AccessControl',
                     'rules' => [
                         [
                             'allow' => true,
                             'roles' => ['admin'],
                         ]
                     ]
                 ]
             ]
            ...
            ...
        ],
index.php?r=backup