mirror of
https://github.com/flarum/core.git
synced 2025-08-19 14:51:47 +02:00
Database changes (#16)
* Add foreign keys * Rename table * Use whereColumn * Update core attribute names
This commit is contained in:
committed by
Franz Liedke
parent
7526b70cf5
commit
74fac8c206
@@ -42,7 +42,7 @@ class AddPostLikesRelationship
|
||||
public function getModelRelationship(GetModelRelationship $event)
|
||||
{
|
||||
if ($event->isRelationship(Post::class, 'likes')) {
|
||||
return $event->model->belongsToMany(User::class, 'posts_likes', 'post_id', 'user_id', null, null, 'likes');
|
||||
return $event->model->belongsToMany(User::class, 'post_likes', 'post_id', 'user_id', null, null, 'likes');
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -48,7 +48,7 @@ class PostLikedBlueprint implements BlueprintInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSender()
|
||||
public function getFromUser()
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
Reference in New Issue
Block a user