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