search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $page = Feed::pushScope(new RequestScope()) ->pushScope(new FeedPublicScope()) ->paginate($pageLimit) ->withQueryString(); $feeds = new FeedsCollection($page); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('feed::feed.names')) ->view('feed::public.feed.index') ->data(compact('feeds', 'categories', 'tags', 'recent')) ->output(); } /** * Show feed. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $model = Feed::findBySlug($slug); $data = new FeedResource($model); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('feed::feed.name')) ->view('feed::public.feed.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }