references = $references; parent::__construct(); } /** * Execute the console command. * * @return int */ public function handle() { $connection = DB::getDefaultConnection(); if ($this->option('database')) { DB::setDefaultConnection($this->option('database')); } $this->references->updateForAllPages(); DB::setDefaultConnection($connection); $this->comment('References have been regenerated'); return 0; } }