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


PHP Payment::scope方法代码示例

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


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

示例1: edit

 public function edit($publicId)
 {
     $payment = Payment::scope($publicId)->firstOrFail();
     $payment->payment_date = Utils::fromSqlDate($payment->payment_date);
     $data = array('client' => null, 'invoice' => null, 'invoices' => Invoice::scope()->where('is_recurring', '=', false)->where('is_quote', '=', false)->with('client', 'invoice_status')->orderBy('invoice_number')->get(), 'payment' => $payment, 'method' => 'PUT', 'url' => 'payments/' . $publicId, 'title' => 'Edit Payment', 'paymentTypes' => PaymentType::remember(DEFAULT_QUERY_CACHE)->orderBy('id')->get(), 'clients' => Client::scope()->with('contacts')->orderBy('name')->get());
     return View::make('payments.edit', $data);
 }
开发者ID:poseidonjm,项目名称:invoice-ninja,代码行数:7,代码来源:PaymentController.php

示例2: bulk

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function bulk()
 {
     $public_id = Input::get('public_id');
     $payment = Payment::scope($public_id)->first();
     $payment->delete();
     $message = "Pago eliminado con éxito";
     Session::flash('message', $message);
     return Redirect::to('pagos');
 }
开发者ID:Vrian7ipx,项目名称:repocas,代码行数:15,代码来源:PaymentController.php

示例3: index

 public function index()
 {
     if (!Utils::isPro()) {
         return Redirect::to('/');
     }
     $payments = Payment::scope()->orderBy('created_at', 'desc')->get();
     $payments = Utils::remapPublicIds($payments->toArray());
     $response = json_encode($payments, JSON_PRETTY_PRINT);
     $headers = Utils::getApiHeaders(count($payments));
     return Response::make($response, 200, $headers);
 }
开发者ID:stewartadam,项目名称:invoice-ninja,代码行数:11,代码来源:PaymentApiController.php

示例4: export

 private function export()
 {
     $output = fopen('php://output', 'w') or Utils::fatalError();
     header('Content-Type:application/csv');
     header('Content-Disposition:attachment;filename=export.csv');
     $clients = Client::scope()->get();
     AccountController::exportData($output, $clients->toArray());
     $contacts = Contact::scope()->get();
     AccountController::exportData($output, $contacts->toArray());
     $invoices = Invoice::scope()->get();
     AccountController::exportData($output, $invoices->toArray());
     $invoiceItems = InvoiceItem::scope()->get();
     AccountController::exportData($output, $invoiceItems->toArray());
     $payments = Payment::scope()->get();
     AccountController::exportData($output, $payments->toArray());
     $credits = Credit::scope()->get();
     AccountController::exportData($output, $credits->toArray());
     fclose($output);
     exit;
 }
开发者ID:stewartadam,项目名称:invoice-ninja,代码行数:20,代码来源:AccountController.php


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