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