So if you want to use scope queries you can't have a conflicting function name.
When you created
scopeWaiting laravel treats that as
waiting(). Unfortunately, there is a naming conflict there.
Perhaps change your scope query to
scopeIsWaiting and then you can call it like
I've come across this a couple of times, in most cases I have other where clauses or joins included in my query so I append the scope call to these further down the chain:
If you have no other clauses to attach to the query then you could do this:
Looking at some of the cashier source code it doesn't look like they ever call the scope as the first clause it's always further down the chain.
Hope this helps.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us