. */ declare(strict_types=1); namespace FireflyIII\Console\Commands\System; use FireflyIII\Console\Commands\ShowsFriendlyMessages; use Illuminate\Console\Command; class SetsLatestVersion extends Command { use ShowsFriendlyMessages; protected $description = 'Set latest version in DB.'; protected $signature = 'firefly-iii:set-latest-version {--james-is-cool}'; /** * Execute the console command. */ public function handle(): int { if (!$this->option('james-is-cool')) { $this->friendlyError('Am too!'); return 0; } app('fireflyconfig')->set('db_version', config('firefly.db_version')); app('fireflyconfig')->set('ff3_version', config('firefly.version')); $this->friendlyInfo('Updated version.'); return 0; } }