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