Last active
July 13, 2017 18:50
-
-
Save vojtasvoboda/dcfe5ef84771dd1a4f77c4e03e84bfe8 to your computer and use it in GitHub Desktop.
Spark with team billing and without
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App\Http\Controllers; | |
class HomeController extends Controller | |
{ | |
/** | |
* Create a new controller instance. | |
* | |
* @return void | |
*/ | |
public function __construct() | |
{ | |
$this->middleware('auth'); | |
// with Team billing it should be teamSubscribed | |
$this->middleware('subscribed'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App\Providers; | |
class SparkServiceProvider extends ServiceProvider | |
{ | |
public function booted() | |
{ | |
// without Team billing | |
Spark::useStripe()->noCardUpFront()->trialDays(10); | |
Spark::freePlan() | |
->features([ | |
'First', 'Second', 'Third' | |
]); | |
Spark::plan('Basic', 'provider-id-1') | |
->price(10) | |
->features(['First', 'Second', 'Third']); | |
// with Team billing | |
Spark::useStripe()->noCardUpFront()->teamTrialDays(10); | |
Spark::freeTeamPlan() | |
->features([ | |
'First', 'Second', 'Third' | |
]); | |
Spark::teamPlan('Basic', 'provider-id-1') | |
->price(10) | |
->features(['First', 'Second', 'Third']); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App; | |
// with Team billing | |
use Laravel\Spark\CanJoinTeams; | |
class User extends SparkUser | |
{ | |
// with Team billing | |
use CanJoinTeams; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment