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