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

Nana-Odai's avatar

Laravel Cashier - Call to a member function where() on null

I am using Laravel Cashier for subscriptions.

I get the error Call to a member function where() on null. Cashier is not able to get the Plan name if I check the user subscription below. I have created a product on the stripe dashboard with the name "Pro Membership"

if (!$user->subscribed('Pro Membership')) {
//create subscription
}else{
//swap subscription
}
0 likes
1 reply
martinbean's avatar
Level 80

@nana-odai It sounds like your model’s relations aren’t set up correctly.

Please or to participate in this conversation.