/** * Execute the console command. * * @return void */ public function fire() { if ($this->platform->isInstalled()) { $this->info('Upgrading Platform Extensions'); $this->platform->updateExtensions(); } }
/** * Constructor. * * @param \Platform\Foundation\Platform $platform * @param \Platform\Installer\Installer $installer * @param \Illuminate\Filesystem\Filesystem $filesystem * @return void */ public function __construct(Platform $platform, Installer $installer, Filesystem $filesystem) { $this->platform = $platform; $this->installer = $installer; $this->filesystem = $filesystem; $this->beforeFilter(function ($route, $request) { $isInstalled = $this->platform->isInstalled(); $completionStep = ends_with($request->path(), 'complete'); if (!$completionStep && $isInstalled) { return redirect('/'); } if ($completionStep && !$isInstalled) { return redirect('installer'); } }); }