/** * Execute the console command. * */ public function fire() { $posts = Post::all(); foreach ($posts as $post) { $this->updateMetadata($post); } }
/** * @return \Illuminate\Database\Eloquent\Collection|static[] */ public function getAllPosts() { return $this->post->all(); }