repository = $tbl_office; parent::__construct(); } /** * Show tbl_office's list. * * @param string $slug * * @return response */ protected function index() { $tbl_offices = $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_office.names')) ->view('lavalite-karneaud-cargo::tbl_office.index') ->data(compact('tbl_offices')) ->output(); } /** * Show tbl_office. * * @param string $slug * * @return response */ protected function show($slug) { $tbl_office = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->response->setMetaTitle($$tbl_office->name . trans('lavalite-karneaud-cargo::tbl_office.name')) ->view('lavalite-karneaud-cargo::tbl_office.show') ->data(compact('tbl_office')) ->output(); } }