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