18 lines
549 B
PHP
18 lines
549 B
PHP
<?php
|
|
|
|
use app\common\facades\Setting;
|
|
use app\common\helpers\Cache;
|
|
|
|
return [
|
|
app\common\events\PluginWasEnabled::class => function ($plugins) {
|
|
\Artisan::call('migrate',['--path'=>'plugins/decorate/migrations','--force'=>true]);
|
|
if (!$plugins->isEnabled()) {
|
|
Cache::flush();
|
|
Setting::set('plugin.decorate.is_open', 1);
|
|
}
|
|
},
|
|
app\common\events\PluginWasDeleted::class => function ($plugins) {
|
|
\Artisan::call('migrate:rollback',['--path'=>'plugins/decorate/migrations']);
|
|
},
|
|
];
|