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