horat1us/yii2-migration-bootstrap
Composer 安装命令:
composer require horat1us/yii2-migration-bootstrap
包简介
Yii2 Migrations Bootstrap
README 文档
README
This package provides \yii\base\BootstrapInterface implementation to append packages migrations to console application.
Main purpose is to prevent mistakes while re-configuring console application.
Previous implementation was available in horat1us/yii2-base package as BootstrapMigrations trait.
Installation
Using packagist.org:
composer require horat1us/yii2-migration-bootstrap:^1.0
Structure
- BootstrapTrait - base implementation, can be used outside
\yii\base\BootstrapInterfaceimplementation. - Bootstrap -
yii\base\BootstrapInterfaceimplementation using BootstrapTrait
Example
Implement \yii\base\BootstrapInterface in your yii2 package:
<?php namespace Package; use Horat1us\Yii; class Bootstrap extends Yii\Migration\Bootstrap { public $namespaces = __NAMESPACE__ . "\\Migrations"; public $aliases = ['Package' => '@vendor/developer/package/src']; }
Then add to application bootstraps:
<?php // config.php use Package; return [ 'bootstrap' => [ 'class' => Package\Bootstrap::class, ], // ... another application config ];
License
统计信息
- 总下载量: 1.62k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-21