mirror of
https://github.com/flarum/core.git
synced 2025-08-11 10:55:47 +02:00
Fix likes relationship method arguments
As per https://laravel.com/docs/5.5/upgrade (under "Eloquent")
This commit is contained in:
@@ -42,7 +42,7 @@ class AddPostLikesRelationship
|
|||||||
public function getModelRelationship(GetModelRelationship $event)
|
public function getModelRelationship(GetModelRelationship $event)
|
||||||
{
|
{
|
||||||
if ($event->isRelationship(Post::class, 'likes')) {
|
if ($event->isRelationship(Post::class, 'likes')) {
|
||||||
return $event->model->belongsToMany(User::class, 'posts_likes', 'post_id', 'user_id', 'likes');
|
return $event->model->belongsToMany(User::class, 'posts_likes', 'post_id', 'user_id', null, null, 'likes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user