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

iamDiscovery's avatar

Spark: Bad Method Call

Laravel gives the error "Call the undefined method App\Models\User::sparkConfiguration()"

I followed the tutorial.

The solution says "Did you mean App\Models\User::setConnection()"

What have I missed or what should I do?

0 likes
2 replies
phikhi's avatar

Just had the same error, a couple of minutes ago...

make sure that in your User model, you import the Spark\Billable trait.

By default my IDE imported the Laravel\Paddle\Billable trait instead.

Hope it fixes it, for you ;)

1 like
PT-83's avatar

@vapordev

import use Spark\Billable; trait. And also in the class like follows.

class User extends Authenticatable
{
    use HasApiTokens;
    use HasFactory;
    use HasProfilePhoto;
    use Notifiable;
    use TwoFactorAuthenticatable;
    use Billable;

Please or to participate in this conversation.