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