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