Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SquareNetMedia's avatar

Laravel Cashier

Hello

I've followed the cashier series and have managed to get stripe up and running for a membership subscription. I was wanting to create an admin panel which had a widget which shows the admin the amounts made each month in graphical format.

Can anyone recommend a tutorial on how this would be created? The ones I have found for creating graphs seems okay, but not sure how to get the data from Stripe into my Laravel project to create it.

Sorry newbie here so just playing around trying to use as many tutorials to build up my knowledge but struggling to find anything on this

0 likes
4 replies
furqanDev's avatar

When using Cahier Package you get database migrations like Subscription and Subscription Items. In those tables you have stripe price Id but no the price itself.

I suppose you have also set up a system to handle the incoming webhooks or a file where you handle the success part after you receive stripe response.

In the response you will get object with data the transaction details. You can create a Payment model and save total, subtotal, stripe_id and user_id in there. You can get all these from the response you received after success.

This is the easy way because you will have all the payments in that table and you can work around it the way you like. You can create Daily, Weekly, Monthly, Yearly or any type of graph with it. You just have to create a dataset like you want and pass it to the view for the graph.

Tippin's avatar

Just curious, is there a reason the stats MUST be on your site? I find the dashboard and included graphs the stripe site gives are more than enough for my clients to look over. I can understand on an individual user basis to see a quick overview as an admin, but beyond that, I use stripe dash all day.

SquareNetMedia's avatar

@Tippin there is no reason it has to be, I'm just playing about with cashier and wanted to replicate the things I have seen in other applications

Please or to participate in this conversation.