"upcomingInvoice" method in Laravel Cashier (Stripe)

You can show how much a customer will pay in the next billing cycle.

There is a "upcomingInvoice" method in Laravel Cashier (Stripe) to get the upcoming invoice details.

1Route::get('/profile/invoices', function (Request $request) {
2 return view('/profile/invoices', [
3 'upcomingInvoice' => $request->user()->upcomingInvoice(),
4 'invoices' => $request-user()->invoices(),
5 ]);
6});

Tip given by @oliverds_

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 22 courses (477 lessons, total 38 h 20 min)
  • 2 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord