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