
Install a fresh Laravel project with the installer or composer and create a Laravel Subscriptions app. Set up Vue with Inertia stack using Breeze and Inertia SSR, with optional TypeScript.
Customize the default Laravel Breeze with Inertia and Vue by rendering a custom home page via an invokable controller, and adjust authenticated layouts and guest navigation.
Store subscription plants data in a dedicated Laravel config file (subscriptions.php), defining monthly and yearly plans and retrieving Stripe price IDs to render them.
Render monthly and yearly subscription plans on the front end by defining a route and controller with inertia, loading data from subscriptions config, and passing it to the plans component.
Install and configure laravel cashier for stripe, publish migrations, migrate, and apply the billable trait to the user model. Prepare env keys and price IDs for checkout sessions.
Implement a checkout session using Laravel Cashier and Stripe, routing plant clicks to Stripe's checkout flow and fetching the plan price ID from the subscriptions config.
Validate the front-end plan input before stripe checkout by checking the selected plan against registered plans and redirecting invalid ones to the plans page or a 404.
Enable promotion codes in the checkout flow to let users enter discounts, and create coupons in Stripe with percentage or fixed discounts, plus configure webhooks for Laravel.
Configure Stripe webhooks and handle subscription events with Laravel Cashier, using endpoints, local testing with ngrok or expose, and CSRF exemptions.
Check a customer's subscription status in the backend using the billable trait and subscribed method, then send status to the frontend with Inertia.js and Vue 3 to render gated content.
Protect a route by building a dedicated protected controller, view, and middleware that redirects non-subscribed users to the plans page, ensuring only subscribed users access the page.
Use a user API resource to pass subscribed status, render navigation conditionally, and protect pages on both front end and back end, while disabling API wrapping.
Create a user billing area with Stripe integration, enabling subscription management, updating payment details, and redirecting to the Stripe billing portal via Inertia routes and a subscription controller.
Learn to display a subscribed user's plan details by fetching data from Stripe via Laravel Cashier, formatting it with decorators, and rendering currency and renewal info.
Learn to display the next subscription renewal date and total charge in a Laravel app using Cashier, retrieving the upcoming invoice, formatting with Carbon, and rendering it on the frontend.
Implement canceling and resuming subscriptions with Laravel Cashier, exposing subscription data to the frontend, and creating resume and cancel routes and components for seamless user control.
Learn to keep customer details in sync with Stripe by using a user observer to trigger Laravel Cashier's sync Stripe customer details when a user updates.
Display and download invoices within the subscription page. Build an invoice resource to format date and total, pass data from the controller, and render via a Vue component.
Enable authenticated users to download invoices by passing each invoice id through the backend to the invoice.download route, leveraging Laravel Cashier and dompdf to generate and deliver pdf invoices.
Listen for custom webhook events from Stripe in a Laravel app, define a webhook listener for subscription created, and log payloads to react with actions like sending emails.
Listen for the subscription ended webhook, identify the user via Stripe ID with Laravel Cashier, and send an email notification using a dedicated subscription ended mail, tested with Mailtrap.
Enable Stripe subscription trials in Laravel Cashier, configure trial days, and display days remaining until the trial ends in the UI, using on trial status to conditionally render.
Define and apply middlewares like redirect if subscribed, redirect if not subscribed, cancelled, and not cancelled to manage access across plans, resume, cancel, and the stripes portal.
Explore how past due payments impact Laravel subscriptions, simulate Stripe failures, and implement cashier to keep access to protected content and notify users to update their card details.
Fix remaining issues in the Laravel Subscriptions course by applying optional chaining to plan and currency, and validating Stripe purchases, cancellations, and resumes.
Develop lifetime memberships by adding a lifetime flag to users, implementing has lifetime membership and has membership checks, and updating backend and front-end logic to support lifetime status.
Implement lifetime memberships in a Laravel subscription system by adding a lifetime type to subscriptions.php, creating a dedicated lifetime checkout with Stripe and Cashier, and routing the flow.
Define a lifetime plan on the plans page, connect the checkout flow, and handle Stripe checkout and webhooks to grant lifetime membership.
Learn how to start accepting subscriptions with Laravel and build a solid foundation for your next application.
This course will teach you everything you need to know to implement a flexible subscription system on a typical Laravel Project.
Even if you’re completely new to Laravel, by the end of this course you’ll have a platform where customers can purchase subscriptions and gain access to restricted areas of your application.
We’ll also cover managing subscriptions, cancellations, invoices, giving customers trial periods, allowing promotion codes — and more.
We'll cover the following topics along the way:
Learn how to install and configure Laravel Cashier for Stripe to accept payments in your Laravel App.
Learn how to adjust and make necessary changes on a default Laravel Breeze Boilerplate for implementing a Subscriptions System.
Learn to create a store plan's data on a configuration file and query the plan's data accordingly.
Learn how to create Stripe Checkout Sessions with Laravel Cashier.
We'll also allow promotion codes so that customers can enter promotion codes to receive discounts on special occasions like Black Friday Deals.
We'll also learn how to configure webhooks in our Laravel Application which will allow us to listen for stripe webhook events and act on them accordingly based on the type of event that has occurred.
Learn how to define protected routes and views that can only be accessed by customers who have a valid subscription.
We'll also learn how to redirect the customers to Stripe's Billing Portal where they can manage their subscription details like cards, cancel and resume subscriptions, update personal details, and so on.
We'll also learn how to implement subscription trials to allow our customers to access our protected area for some days before they commit to paying the subscription fee.
We'll also learn how to implement displaying and downloading invoices so that our customers can view all the past payments that they've made.
Learn how to define a dedicated subscription area where the customers can view and manage their subscription details like canceling and resuming subscriptions, the next renewal date, and total charge along with plan details and so on.
We'll also let them swap to a lifetime subscription from the subscription page itself.
We'll also learn how to handle past due payments, and we'll also look at how we can either let them access our protected area, or prevent the access accordingly, if in case our customer ends up in a past due state.
We'll learn how to define dedicated middleware to check for the subscription status of the User, and allow access accordingly, we'll also define middleware to check for the user's subscription cancellation status.
Learn how to listen for specific webhook events sent by Stripe and act on them accordingly, using this feature, we'll send an Email to our customers when their subscription ends.
And finally, in our second section, we'll implement Lifetime Memberships in our subscriptions system, we'll learn the following along the way:
Learn how to implement a Stripe Checkout Session to accept a one-time payment from our customers.
We'll also make necessary changes to our subscription system to implement Lifetime Memberships.
We'll learn how to cancel the customer's existing subscription (if they have any) when swapping their membership for a lifetime membership.