repository = $circular; parent::__construct(); } /** * Show circular's list. * * @param string $slug * * @return response */ protected function index() { $circulars = $this->repository ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria')) ->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->theme->of('circular::public.circular.index', compact('circulars'))->render(); } /** * Show circular. * * @param string $slug * * @return response */ protected function show($slug) { $circular = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->theme->of('circular::public.circular.show', compact('circular'))->render(); } }