protected function optimizeApplication()
    {
        $this->call('config:clear');
        $this->call('route:clear');
        $this->call('clear-compiled');

        if ($this->laravel->environment('production') && !$this->option('no-cache')) {
            $this->call('config:cache');
            $this->call('route:cache');
        }

        if (!$this->option('no-optimize')) {
            $this->call('antares:optimize');
        }
    }