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