Yii 2.0: yii2-install

Database Installing functionality module extention for Yii2.
1 follower

# yii2-installer

Database Installing functionality module extention for Yii2.

=========== Database Installer for every Site

### Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist spanjeta/yii2-install "*"

or add

"spanjeta/yii2-install": "*"

to the require section of your composer.json file.

### Usage

```

Add to modules

$config ['modules'] ['install'] = [ 
            'class' => 'app\modules\install\Install'
    ];

Save your SQL file in _backup folder with the name of "db_backup.sql".

Add to web.php file

defined ( 'SQL_FILE_PATH' ) or define ( 'SQL_FILE_PATH', dirname ( __FILE__ ) .'/../_backup/db_backup.sql' );
defined ( 'DB_CONFIG_PATH' ) or define ( 'DB_CONFIG_PATH', dirname ( __FILE__ ) . '/config/' );
defined ( 'DB_CONFIG_FILE_PATH' ) or define ( 'DB_CONFIG_FILE_PATH', DB_CONFIG_PATH  . 'db' . '.php' );
defined ( 'DB_BACKUP_FILE_PATH' ) or define ( 'DB_BACKUP_FILE_PATH', dirname ( __FILE__ ) );

Pretty Url's /install

No pretty Url's index.php?r=install

```

Be the first person to leave a comment

Please to leave your comment.

Create extension
Downloads
No downloadable files yet
  • Yii Version: 2.0
  • License: Apache License 2.0
  • Developed by: shiv
  • Category: Database
  • Votes: No votes yet
  • Downloaded: 0 times
  • Created on: Jul 5, 2016
  • Last updated: Jul 5, 2016