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