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