Exemplo n.º 1
0
 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle()
 {
     $shipService = new shipService();
     $ships = $shipService->getAllShippingProcessing();
     foreach ($ships as $ship) {
         sleep(7);
         $status = $shipService->GetOrderInfoStatus($ship->id);
         $ship = $shipService->updateShippingStatus($ship->id, $status);
         \Log::info('__CRON__ Update status ship: ' . $ship->id);
     }
 }
Exemplo n.º 2
0
 public function detail(Request $request)
 {
     $orderService = new orderService();
     $addressService = new addressService();
     $shipService = new shipService();
     $shippingId = $request->input('id');
     try {
         $status = $shipService->GetOrderInfoStatus($shippingId);
         $ship = $shipService->updateShippingStatus($shippingId, $status);
         $ship->statusDesc = ViewGenerateHelper::getStatusDescriptionShip($status, $shippingId);
         $user_address = $ship->addressReceive;
         $cities = $addressService->getListCity()->lists('name', 'id');
         $districts = $addressService->getListDistrict();
         return view('admin.shipping.detail', compact('ship', 'user_address', 'cities', 'districts'));
     } catch (\Exception $e) {
         // @codeCoverageIgnoreStart
         $return['error'] = $e->getMessage();
         $return['errorMsg'] = $e->getMessage();
         // @codeCoverageIgnoreEnd
     }
 }