Exemplo n.º 1
1
 /**
  * Show the application registration form.
  *
  * @param  Request  $request
  * @return Response
  */
 public function showRegistrationForm(Request $request)
 {
     if (Spark::promotion() && !$request->has('coupon')) {
         // If the application is running a site-wide promotion, we will redirect the user
         // to a register URL that contains the promotional coupon ID, which will force
         // all new registrations to use this coupon when creating the subscriptions.
         return redirect($request->fullUrlWithQuery(['coupon' => Spark::promotion()]));
     }
     return view('spark::auth.register');
 }
 /**
  * {@inheritdoc}
  */
 public function canBeRedeemed($code)
 {
     return $this->valid($code) && Spark::promotion() !== $code;
 }
 /**
  * Customize the subscription plans for the application.
  *
  * @return void
  */
 protected function customizeSubscriptionPlans()
 {
     Spark::promotion('50-percent-off-membership');
     Spark::free()->features(['Learn to code on your own time!', 'New content offered weekly!', 'Learn best practices and current industry standards!']);
     Spark::plan('Premium - Monthly', 'jyrone-parker-blog-monthly')->price(9.99)->trialDays(7)->features(['Get access to wider array of tutorials!', 'Get added to my email list!', 'Get access to my virtual office hours!']);
     Spark::plan('Premium - Yearly', 'jyrone-parker-yearly')->price(99)->yearly()->trialDays(7)->features(['Save over 17% off regular membership!', 'Free T-Shirt!', '10% discount off everything in the store!']);
 }