repository = $passenger_manifest; parent::__construct(); } /** * Show passenger_manifest's list. * * @param string $slug * * @return response */ protected function index() { $passenger_manifests = $this->repository ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria')) ->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->response->setMetaTitle(trans('logbook::passenger_manifest.names')) ->view('logbook::public.passenger_manifest.index') ->data(compact('passenger_manifests')) ->output(); } /** * Show passenger_manifest. * * @param string $slug * * @return response */ protected function show($slug) { $passenger_manifest = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->response->setMetaTitle($passenger_manifest->name . trans('logbook::passenger_manifest.name')) ->view('logbook::public.passenger_manifest.show') ->data(compact('passenger_manifest')) ->output(); } }