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

redviking99's avatar

Require new users to create a team

HI,

I'm new to Laravel/Spark - for my app I'd like the user to create a team upon registering, and be only able to create/manage that single team.

I see in the register-common-form.blade.php in order for the team fields to display, this must be true: @if (Spark::usesTeams() && Spark::onlyTeamPlans())

where are those variables set? I've tried adding 'use CanJoinTeams' to app/User.php but the teams settings page is blank and there is no prompt to choose a team name during registration.

I originally installed spark without team billing, but per documentation, enabled it via CanJoinTeams as above

I also set Spark::noAdditionalTeams() in SparkServiceProvider booted method.

Please help! Thanks!

0 likes
3 replies
bjones2015's avatar

https://laracasts.com/discuss/channels/spark/cannot-invite-team-members-without-asking-for-paid-subscription

The above is for your next roadblock (assuming you have paid plans and don't want the invited users to pay also)

For having team plans, you build the app with the team billing flag

spark new project-name --team-billing

but I'm sure there is some way to turn it on after the fact.

Then in your Spark Service Provider booted method make sure not to have any user plans (Spark::plan) defined and have at least one team plan defined (Spark::teamPlan)

bjones2015's avatar

actually you may be able to make a free team plan to make things work, assuming you want don't want charging

Spark::freeTeamPlan('Some Plan Name');

Please or to participate in this conversation.