public function registerPostTypes() { $models = ['Flarum\\Core\\Post\\CommentPost', 'Flarum\\Core\\Post\\DiscussionRenamedPost']; $this->app->make('events')->fire(new ConfigurePostTypes($models)); foreach ($models as $model) { Post::setModel($model::$type, $model); } }