Not sure how to do both at the same time.
This will get all current subscriptions.
Laravel\Cashier\Subscription::query()->active()->get();
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
In my application a user can only have one active subscription.
I'm using the stock \App\Models\User::class as my cashier model.
How can I get a list of all users who have active subscriptions?
The context is I need to perform a mass operation but only on users who have active subscriptions. It can be "paid up" or on trial, as long as it's active.
I am aware I can do this per user:
$user->subscribed('default');
Of course I can loop over the data but the User model appears to morph somehow to Subscription which probably means with something like map or has I might be able to accomplish something much more efficient.
Just need a few pointers if possible.
Please or to participate in this conversation.