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