Emilio Schepis
Emilio Schepis

Reputation: 2007

Setting the paddle email on a Laravel Spark / Cashier project with Jetstream Teams

I've recently purchased Laravel Spark to handle subscriptions, and I installed it on my Jestream project with teams support.

According to the cookbook in the documentation I should set the paddleEmail to be the team owner's email address.

use Spark\Billable;

class Team extends JetstreamTeam
{
    use Billable;

    public function paddleEmail(): string|null
    {
        return $this->owner->email;
    }
}

This is exactly what I expect, however I also want my users to be able to own multiple teams. In this case, when the user creates a second team, they receive an error because the customer table already has a record related to the same customer paddle_id (but for another billable model).

Is there a way in Spark / Cashier to allow users to own more than one team, and potentially pay more than one subscription?

Upvotes: 0

Views: 54

Answers (0)

Related Questions