在我SparkServiceProvider.php
设置火花配置和计划的地方,我有Spark::referToTeamAs('group');
当我访问时/missing-group
,我收到 404 错误,因为 var_dumping $teamString in/spark/src/Http/routes.php
正在显示team
而不是group
. 因此,在使用该路由文件之前,我的设置似乎没有被捕获。
有没有办法在调用该路由文件之前设置 teamString ?比如改变服务提供者的顺序之类的?
我不确定从哪里开始。提前致谢!
App\Providers\SparkServiceProvider
...
/**
* Finish configuring Spark for the application.
*
* @return void
*/
public function booted()
{
Spark::collectsBillingAddress();
Spark::afterLoginRedirectTo('/dashboard');
Spark::referToTeamAs('group');
Spark::useStripe()
->noProrate()
->noAdditionalTeams();
Spark::plan('Individual', 'stripe-individual-ticket')
->price(300)
->features(['First', 'Second', 'Third'])
->yearly();
Spark::teamPlan('Group', 'stripe-group-ticket')
->price(300)
->features(['First', 'Second', 'Third'])
->yearly();
}
...