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