當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Spark::promotion方法代碼示例

本文整理匯總了PHP中Laravel\Spark\Spark::promotion方法的典型用法代碼示例。如果您正苦於以下問題:PHP Spark::promotion方法的具體用法?PHP Spark::promotion怎麽用?PHP Spark::promotion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Laravel\Spark\Spark的用法示例。


在下文中一共展示了Spark::promotion方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: showRegistrationForm

 /**
  * 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');
 }
開發者ID:defenestrator,項目名稱:groid,代碼行數:16,代碼來源:RegisterController.php

示例2: canBeRedeemed

 /**
  * {@inheritdoc}
  */
 public function canBeRedeemed($code)
 {
     return $this->valid($code) && Spark::promotion() !== $code;
 }
開發者ID:defenestrator,項目名稱:groid,代碼行數:7,代碼來源:BraintreeCouponRepository.php

示例3: customizeSubscriptionPlans

 /**
  * 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!']);
 }
開發者ID:mastashake08,項目名稱:jyroneparker,代碼行數:12,代碼來源:SparkServiceProvider.php


注:本文中的Laravel\Spark\Spark::promotion方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。