当前位置: 首页>>代码示例>>PHP>>正文


PHP Spark::generateInvoicesWith方法代码示例

本文整理汇总了PHP中Laravel\Spark\Spark::generateInvoicesWith方法的典型用法代码示例。如果您正苦于以下问题:PHP Spark::generateInvoicesWith方法的具体用法?PHP Spark::generateInvoicesWith怎么用?PHP Spark::generateInvoicesWith使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Laravel\Spark\Spark的用法示例。


在下文中一共展示了Spark::generateInvoicesWith方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: boot

 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     if (method_exists($this, 'customizeSpark')) {
         $this->customizeSpark();
     }
     if (method_exists($this, 'customizeRegistration')) {
         $this->customizeRegistration();
     }
     if (method_exists($this, 'customizeRoles')) {
         $this->customizeRoles();
     }
     if (method_exists($this, 'customizeProfileUpdates')) {
         $this->customizeProfileUpdates();
     }
     if (method_exists($this, 'customizeSubscriptionPlans')) {
         $this->customizeSubscriptionPlans();
     }
     if (method_exists($this, 'customizeSettingsTabs')) {
         $this->customizeSettingsTabs();
     }
     if ($this->twoFactorAuth) {
         Spark::withTwoFactorAuth();
     }
     Spark::generateInvoicesWith($this->invoiceWith);
 }
开发者ID:Braunson,项目名称:spark,代码行数:30,代码来源:AppServiceProvider.php

示例2: notify

 /**
  * Notify the given user about a new invoice.
  *
  * @param  \Illuminate\Contracts\Auth\Authenticatable  $user
  * @param  \Laravel\Cashier\Invoice  $invoice
  * @return void
  */
 public function notify(Authenticatable $user, Invoice $invoice)
 {
     $invoiceData = array_merge(['vendor' => 'Vendor', 'product' => 'Product', 'vat' => new ViewExpression(nl2br(e($user->extra_billing_info)))], Spark::generateInvoicesWith());
     $data = compact('user', 'invoice', 'invoiceData');
     Mail::send('spark::emails.billing.invoice', $data, function ($message) use($user, $invoice, $invoiceData) {
         $message->to($user->email, $user->name)->subject('Your ' . $invoiceData['product'] . ' Invoice')->attachData($invoice->pdf($invoiceData), 'invoice.pdf');
     });
 }
开发者ID:Braunson,项目名称:spark,代码行数:15,代码来源:EmailInvoiceNotifier.php

示例3: downloadInvoice

 /**
  * Download the given invoice for the user.
  *
  * @param  string  $invoiceId
  * @return \Illuminate\Http\Response
  */
 public function downloadInvoice(Request $request, $invoiceId)
 {
     $data = array_merge(['vendor' => 'Vendor', 'product' => 'Product', 'vat' => new ViewExpression(nl2br(e($request->user()->extra_billing_info)))], Spark::generateInvoicesWith());
     return Auth::user()->downloadInvoice($invoiceId, $data);
 }
开发者ID:mzkmzk,项目名称:spark,代码行数:11,代码来源:SubscriptionController.php


注:本文中的Laravel\Spark\Spark::generateInvoicesWith方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。