當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。