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