Level 16
Bah! What a morning this is starting out to be. :) Turns out I forgot to add the trait to the User class. Hope this helps someone else down the road (at least then I won't feel quite so useless).
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am trying to set my Stripe Key in a Service Provider, but am getting the following error:
Call to undefined method Illuminate\Database\Query\Builder::setStripeKey()
I am trying to do this as the docs describe, and I have verified that the correct key is being pulled from the environment variables:
public function boot()
{
// [...]
User::setStripeKey(getenv('STRIPE_SECRET_KEY'));
}
Any ideas what might be going on here?
Bah! What a morning this is starting out to be. :) Turns out I forgot to add the trait to the User class. Hope this helps someone else down the road (at least then I won't feel quite so useless).
Please or to participate in this conversation.