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