update(['is_scheduler_running' => true]); if(config('ninja.app_version') != base_path('VERSION.txt')) { try { Artisan::call('migrate', ['--force' => true]); } catch (\Exception $e) { nlog("I wasn't able to migrate the data."); } try { Artisan::call('optimize'); } catch (\Exception $e) { nlog("I wasn't able to optimize."); } try { Artisan::call('view:clear'); } catch (\Exception $e) { nlog("I wasn't able to clear the views."); } VersionCheck::dispatch(); } } }