*/ class RebuildForumCacheCommand extends Command { /** * A quick description of this command. * @return string. */ public function brief(): string { return 'Rebuild the forum bbcode cache'; } /** * Does the repository installing. */ public function execute(): void { $this->getLogger()->writeln("This might take a while..."); $posts = DB::table('posts')->get(['post_id']); foreach ($posts as $post) { (new Post($post->post_id))->update(true); } $this->getLogger()->writeln("Done!"); } }