isDefault()) { return collect(); } $query = $this->permissionService()->filterRestrictedEntityRelations( View::query(), 'views', 'viewable_id', 'viewable_type' ) ->orderBy('views.updated_at', 'desc') ->where('user_id', '=', user()->id); return $query->with('viewable') ->skip(($page - 1) * $count) ->take($count) ->get() ->pluck('viewable') ->filter(); } }