mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 10:25:42 +08:00
Replaced depreciated helper function with classfull function
This commit is contained in:
parent
ba3071eaac
commit
d1cf21dcd2
@ -10,12 +10,13 @@
|
||||
namespace Flarum\Mentions\Listener;
|
||||
|
||||
use Flarum\Event\ConfigurePostsQuery;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
class AddFilterByMentions
|
||||
{
|
||||
public function handle(ConfigurePostsQuery $event)
|
||||
{
|
||||
if ($mentionedId = array_get($event->filter, 'mentioned')) {
|
||||
if ($mentionedId = Arr::get($event->filter, 'mentioned')) {
|
||||
$event->query->join('post_mentions_user', 'posts.id', '=', 'post_mentions_user.post_id')
|
||||
->where('post_mentions_user.mentions_user_id', '=', $mentionedId);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user