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