protected function optimize() { if ($this->getLaravel()->environment() !== 'local') { $this->call('optimize', ['--force' => true]); $this->call('config:cache'); $this->call('route:cache'); } }