Skip to content

Commit

Permalink
Use one instance of formatter extender
Browse files Browse the repository at this point in the history
  • Loading branch information
askvortsov1 committed Mar 2, 2021
1 parent 63d22cb commit 2ef0391
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
->css(__DIR__.'/less/forum.less'),

(new Extend\Formatter)
->configure(ConfigureMentions::class),
->configure(ConfigureMentions::class)
->render(Formatter\FormatPostMentions::class)
->render(Formatter\FormatUserMentions::class),

(new Extend\Model(Post::class))
->belongsToMany('mentionedBy', Post::class, 'post_mentions_post', 'mentions_post_id', 'post_id')
Expand Down Expand Up @@ -75,8 +77,4 @@
->listen(Hidden::class, Listener\UpdateMentionsMetadataWhenInvisible::class)
->listen(Deleted::class, Listener\UpdateMentionsMetadataWhenInvisible::class)
->listen(ConfigurePostsQuery::class, Listener\AddFilterByMentions::class),

(new Extend\Formatter())
->render(Formatter\FormatPostMentions::class)
->render(Formatter\FormatUserMentions::class),
];

0 comments on commit 2ef0391

Please sign in to comment.