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