Install.php 613 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace addons\Authority;
  3. use Yii;
  4. use yii\db\Migration;
  5. use common\helpers\MigrateHelper;
  6. use common\interfaces\AddonWidget;
  7. /**
  8. * 安装
  9. *
  10. * Class Install
  11. * @package addons\Authority
  12. */
  13. class Install extends Migration implements AddonWidget
  14. {
  15. /**
  16. * @param $addon
  17. * @return mixed|void
  18. * @throws \yii\base\InvalidConfigException
  19. * @throws \yii\web\NotFoundHttpException
  20. * @throws \yii\web\UnprocessableEntityHttpException
  21. */
  22. public function run($addon)
  23. {
  24. MigrateHelper::upByPath([
  25. '@addons/Authority/console/migrations/'
  26. ]);
  27. }
  28. }
粤ICP备19079148号