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