X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/bab27462aba7ec4370ce906913b663a13a289110..refs/pull/665/head:/app/Services/ViewService.php diff --git a/app/Services/ViewService.php b/app/Services/ViewService.php index 73b353d8f..770a9e39f 100644 --- a/app/Services/ViewService.php +++ b/app/Services/ViewService.php @@ -37,7 +37,7 @@ class ViewService // Otherwise create new view count $entity->views()->save($this->view->create([ - 'user_id' => user()->id, + 'user_id' => $user->id, 'views' => 1 ])); @@ -62,7 +62,7 @@ class ViewService $query->whereIn('viewable_type', $filterModel); } else if ($filterModel) { $query->where('viewable_type', '=', get_class($filterModel)); - }; + } return $query->with('viewable')->skip($skipCount)->take($count)->get()->pluck('viewable'); }