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