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