Level 88
$user->subscription('employer') returns NULL, you need to check that first
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am attempting to use the incrementQuantity approach with Stripe. Using like this:
$user = User::find($request->user()->id);
$user->subscription('employer')->incrementQuantity();
I get this error whenever I run it:
Call to a member function incrementQuantity() on null
Any help is appreciated!
I ended up finding it. You don't need to specify a plan for the method, you can just say:
$user->subscription()->incrementQuantity();
Although the official docs show a plan, which throws the error I received.
Please or to participate in this conversation.