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