stripe = $stripe; } /** * Get all invoices * * @return InvoiceAdminCollection */ public function index() { return new InvoiceAdminCollection( $this->stripe->getInvoices()['data'] ); } /** * Get single invoice by $token * * @param $customer * @param $token * @return InvoiceResource|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View */ public function show($customer, $token) { $settings = json_decode(Setting::all()->pluck('value', 'name')->toJson()); $invoice = $this->stripe->getUserInvoice($customer, $token); return view('vuefilemanager.invoice') ->with('settings', $settings) ->with('invoice', $invoice); } }