コード例 #1
0
 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle()
 {
     $order = Order::findByInvoiceNumber($this->invoiceNo);
     if ($order) {
         $order->update(['status' => 'unpaid']);
         return true;
     }
     return false;
 }
コード例 #2
0
 /**
  * @return bool
  */
 private function orderExists()
 {
     $sessionOrder = $this->session->get(Auth::user()->id);
     if (!$sessionOrder) {
         return false;
     }
     $storageOrder = Order::findByInvoiceNumber($sessionOrder->invoice_no)->newOrder()->first();
     if ($storageOrder) {
         $this->order = $storageOrder;
         return true;
     }
     return false;
 }