Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spanjeta/yii2-install
Database Installing functionality module extention for Yii2.
https://github.com/spanjeta/yii2-install
Last synced: about 1 month ago
JSON representation
Database Installing functionality module extention for Yii2.
- Host: GitHub
- URL: https://github.com/spanjeta/yii2-install
- Owner: spanjeta
- Created: 2016-07-05T10:12:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-05T11:59:28.000Z (over 8 years ago)
- Last Synced: 2024-04-18T00:42:51.705Z (8 months ago)
- Language: PHP
- Size: 15.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yii2-installer
Database Installing functionality module extention for Yii2.===========
Database Installer for every SiteInstallation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
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
```php
$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
```phpdefined ( '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```
```