本文整理汇总了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);
});
}
示例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));
}
示例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()));
}