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


PHP Spark::invoiceDataFor方法代码示例

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


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

示例1: sendInvoiceNotification

 /**
  * Send an invoice notification e-mail.
  *
  * @param  mixed  $billable
  * @param  \Laravel\Cashier\Invoice
  * @return void
  */
 protected function sendInvoiceNotification($billable, $invoice)
 {
     $invoiceData = Spark::invoiceDataFor($billable);
     $data = compact('billable', 'invoice', 'invoiceData');
     Mail::send($this->emailView, $data, function ($message) use($billable, $invoice, $invoiceData) {
         $this->buildInvoiceMessage($message, $billable, $invoice, $invoiceData);
     });
 }
开发者ID:defenestrator,项目名称:groid,代码行数:15,代码来源:SendsInvoiceNotifications.php

示例2: download

 /**
  * Download the invoice with the given ID.
  *
  * @param  Request  $request
  * @param  Team  $team
  * @param  string  $id
  * @return Response
  */
 public function download(Request $request, Team $team, $id)
 {
     abort_unless($request->user()->ownsTeam($team), 403);
     $invoice = $team->localInvoices()->where('id', $id)->firstOrFail();
     return $team->downloadInvoice($invoice->provider_id, ['id' => $invoice->id] + Spark::invoiceDataFor($team));
 }
开发者ID:defenestrator,项目名称:groid,代码行数:14,代码来源:InvoiceController.php

示例3: download

 /**
  * Download the invoice with the given ID.
  *
  * @param  Request  $request
  * @param  string  $id
  * @return Response
  */
 public function download(Request $request, $id)
 {
     $invoice = $request->user()->localInvoices()->where('id', $id)->firstOrFail();
     return $request->user()->downloadInvoice($invoice->provider_id, ['id' => $invoice->id] + Spark::invoiceDataFor($request->user()));
 }
开发者ID:defenestrator,项目名称:groid,代码行数:12,代码来源:InvoiceController.php


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