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