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