mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
refector listener
This commit is contained in:
@ -15,9 +15,9 @@ class Listener
|
||||
protected function check($event)
|
||||
{
|
||||
// Do not apply to the same or newer versions
|
||||
// if (version_compare($event->old, static::VERSION, '>=')) {
|
||||
// return false;
|
||||
// }
|
||||
if (version_compare($event->old, static::VERSION, '>=')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -21,12 +21,12 @@ class Version101 extends Listener
|
||||
*/
|
||||
public function handle(UpdateFinished $event)
|
||||
{
|
||||
// if (!$this->check($event)) {
|
||||
// return;
|
||||
// }
|
||||
if (!$this->check($event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
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