mirror of
https://github.com/flarum/core.git
synced 2025-07-30 13:10:24 +02:00
Fix relationship method arguments
As per https://laravel.com/docs/5.5/upgrade (under "Eloquent")
This commit is contained in:
@@ -59,15 +59,15 @@ class AddPostMentionedByRelationship
|
||||
public function getModelRelationship(GetModelRelationship $event)
|
||||
{
|
||||
if ($event->isRelationship(Post::class, 'mentionedBy')) {
|
||||
return $event->model->belongsToMany(Post::class, 'mentions_posts', 'mentions_id', 'post_id', 'mentionedBy');
|
||||
return $event->model->belongsToMany(Post::class, 'mentions_posts', 'mentions_id', 'post_id', null, null, 'mentionedBy');
|
||||
}
|
||||
|
||||
if ($event->isRelationship(Post::class, 'mentionsPosts')) {
|
||||
return $event->model->belongsToMany(Post::class, 'mentions_posts', 'post_id', 'mentions_id', 'mentionsPosts');
|
||||
return $event->model->belongsToMany(Post::class, 'mentions_posts', 'post_id', 'mentions_id', null, null, 'mentionsPosts');
|
||||
}
|
||||
|
||||
if ($event->isRelationship(Post::class, 'mentionsUsers')) {
|
||||
return $event->model->belongsToMany(User::class, 'mentions_users', 'post_id', 'mentions_id', 'mentionsUsers');
|
||||
return $event->model->belongsToMany(User::class, 'mentions_users', 'post_id', 'mentions_id', null, null, 'mentionsUsers');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user