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