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