/**
  * @return array
  */
 public function generateInvoices()
 {
     $orders = $this->orderRepository->getUninvoicedOrders();
     $invoices = [];
     foreach ($orders as $order) {
         $invoices[] = $this->invoiceFactory->createFromOrder($order);
     }
     return $invoices;
 }
 /**
  * @return \Illuminate\View\View
  */
 public function newAction()
 {
     return view('invoices/new', ['orders' => $this->orderRepository->getUninvoicedOrders()]);
 }
 /**
  * @return array
  */
 public function generateAction()
 {
     return ['orders' => $this->orders->getUninvoicedOrders()];
 }