refector listener

This commit is contained in:
jayvirsinh_gohil
2019-11-15 13:46:31 +05:30
parent 1051b03b00
commit 22784cc230
2 changed files with 7 additions and 7 deletions

View File

@ -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;
} }

View File

@ -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);
} }
} }