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


PHP Invoice::withTrashed方法代码示例

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


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

示例1: bulk

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function bulk($entityType = ENTITY_INVOICE)
 {
     $action = Input::get('action');
     $statusId = Input::get('statusId');
     $ids = Input::get('id') ? Input::get('id') : Input::get('ids');
     if ($action == 'delete') {
         $invoices = Invoice::withTrashed()->scope($ids)->get();
         foreach ($invoices as $invoice) {
             BookSale::deleteBook($invoice);
         }
     }
     //$count = $this->invoiceRepo->bulk($ids, $action, $statusId);
     if ($count > 0) {
         $key = $action == 'mark' ? "updated_{$entityType}" : "{$action}d_{$entityType}";
         $message = Utils::pluralize($key, $count);
         Session::flash('message', $message);
     }
     return Redirect::to("{$entityType}");
 }
开发者ID:Vrian7ipx,项目名称:repocas,代码行数:25,代码来源:invoiceController.php

示例2: getQrPath

 public function getQrPath()
 {
     $invoices = Invoice::withTrashed()->scope(false, $this->id)->get(['invoice_number']);
     $max = 0;
     foreach ($invoices as $invoice) {
         $number = intval(preg_replace("/[^0-9]/", "", $invoice->invoice_number));
         $max = max($max, $number);
     }
     $invoice_numberqr = str_pad($max, 4, "0", STR_PAD_LEFT);
     return 'qr/' . $this->account_key . '_' . $invoice_numberqr . '.jpg';
 }
开发者ID:Vrian7ipx,项目名称:cascadadev,代码行数:11,代码来源:Account.php

示例3: getNextInvoiceNumber

 public function getNextInvoiceNumber()
 {
     $invoices = Invoice::withTrashed()->scope(false, $this->id)->get(['invoice_number']);
     $max = 0;
     foreach ($invoices as $invoice) {
         $number = intval(preg_replace("/[^0-9]/", "", $invoice->invoice_number));
         $max = max($max, $number);
     }
     if ($max > 0) {
         return str_pad($max + 1, 4, "0", STR_PAD_LEFT);
     } else {
         return DEFAULT_INVOICE_NUMBER;
     }
 }
开发者ID:poseidonjm,项目名称:invoice-ninja,代码行数:14,代码来源:Account.php

示例4: getNewInvoiceNumber

 public static function getNewInvoiceNumber()
 {
     $lastInvoiceNumber = Invoice::withTrashed()->orderBy('created_at', 'desc')->pluck('invoice_number');
     return $lastInvoiceNumber + 1;
 }
开发者ID:dbakiu,项目名称:dvc,代码行数:5,代码来源:Invoice.php

示例5: delete

 /**
  * Force remove the specified invoice from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function delete($id)
 {
     Invoice::withTrashed()->where('id', $id)->forceDelete();
     Item::withTrashed()->where('invoice_id', $id)->forceDelete();
     return Redirect::route('invoices.index');
 }
开发者ID:mladjom,项目名称:smartinvoice,代码行数:12,代码来源:InvoicesController.php


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