Not specifically, but you can add that in easily by checking if the user is on a trial when trying to create a new team. See this: https://spark.laravel.com/docs/4.0/billing#constraining-access-to-plans
Can you limit the generic trial teams?
I was wondering if there is a built in way to limit the max amount of teams a trial account can create when using teams. Couldn't find anything in the docs or in the code bbut it seems like a no brainer so wanted to make sure i'm not missing anything. Thanks!
@cdubant you can override every single thing in spark. You can just register your own class into the container and it will use your class instead of Sparks native class. This is often better than using swap methods as you still have access to $this, etc.
Like in SparkServiceProvider, I do:
public function register()
{
Spark::minimumPasswordLength(8);
$this->app->singleton(
'Laravel\Spark\Contracts\Interactions\Settings\Profile\UpdateContactInformation',
'App\Http\SparkExtensions\UpdateContactInformation'
);
}
to use my custom class to update contact info instead of sparks.
My UpdateContactInformation is just an exact copy of the original, and just:
use Laravel\Spark\Interactions\Settings\Profile\UpdateContactInformation as SparkUpdateContactInformation;
class UpdateContactInformation extends SparkUpdateContactInformation`
{
}
along with my customizations to existing methods.
I'm sure it wouldn't be difficult to check how many teams a trial user has before allowing them to create more, or whatever else you'd like to do. It's just laravel, and laravel makes this stuff pretty easy.
Please or to participate in this conversation.