mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
refector listener
This commit is contained in:
@ -15,9 +15,9 @@ class Listener
|
|||||||
protected function check($event)
|
protected function check($event)
|
||||||
{
|
{
|
||||||
// Do not apply to the same or newer versions
|
// Do not apply to the same or newer versions
|
||||||
// if (version_compare($event->old, static::VERSION, '>=')) {
|
if (version_compare($event->old, static::VERSION, '>=')) {
|
||||||
// return false;
|
return false;
|
||||||
// }
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,12 +21,12 @@ class Version101 extends Listener
|
|||||||
*/
|
*/
|
||||||
public function handle(UpdateFinished $event)
|
public function handle(UpdateFinished $event)
|
||||||
{
|
{
|
||||||
// if (!$this->check($event)) {
|
if (!$this->check($event)) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
Artisan::call('db:seed', ['--class' => 'DemoSeeder', '--force' => true]);
|
Artisan::call('db:seed', ['--class' => 'DemoSeeder', '--force' => true]);
|
||||||
|
|
||||||
Setting::getSetting('version', self::VERSION);
|
Setting::setSetting('version', self::VERSION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user