where('customer_id', '=', Auth::user()->customer->id)->paginate(); $payment_methods = Modules::getPaymentMethods(); $categories = collect(Category::enabled()->type('income')->pluck('name', 'id')) ->prepend(trans('categories.all'), ''); $accounts = collect(Account::enabled()->pluck('name', 'id')) ->prepend(trans('accounts.all'), ''); return view('customers.payments.index', compact('payments', 'payment_methods', 'categories', 'accounts')); } /** * Show the form for viewing the specified resource. * * @param Payment $payment * * @return Response */ public function show(Payment $payment) { $payment_methods = Modules::getPaymentMethods(); return view('customers.payments.show', compact('payment', 'payment_methods')); } }