Upgrade to Laravel 5.5

This commit is contained in:
Toby Zerner 2017-12-27 07:32:21 +10:30
parent 8b843a9eb3
commit b4bc534028
4 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ class AddDiscussionTagsRelationship
public function getModelRelationship(GetModelRelationship $event)
{
if ($event->isRelationship(Discussion::class, 'tags')) {
return $event->model->belongsToMany(Tag::class, 'discussions_tags', null, null, 'tags');
return $event->model->belongsToMany(Tag::class, 'discussions_tags', null, null, null, null, 'tags');
}
}

View File

@ -44,7 +44,7 @@ class CreatePostWhenTagsAreChanged
$event->discussion->id,
$event->actor->id,
array_pluck($event->oldTags, 'id'),
$event->discussion->tags()->lists('id')->all()
$event->discussion->tags()->pluck('id')->all()
);
$event->discussion->mergePost($post);

View File

@ -53,7 +53,7 @@ class FilterDiscussionListByTags
$query->whereNotExists(function ($query) {
return $query->select(new Expression(1))
->from('discussions_tags')
->whereIn('tag_id', Tag::where('is_hidden', 1)->lists('id'))
->whereIn('tag_id', Tag::where('is_hidden', 1)->pluck('id'))
->where('discussions.id', new Expression('discussion_id'));
});
}

View File

@ -98,7 +98,7 @@ class SaveTagsToDatabase
if ($discussion->exists) {
$oldTags = $discussion->tags()->get();
$oldTagIds = $oldTags->lists('id')->all();
$oldTagIds = $oldTags->pluck('id')->all();
if ($oldTagIds == $newTagIds) {
return;