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