Ejemplo n.º 1
0
 public function route($id = null)
 {
     $order = Order::with(array('user', 'orderStatus', 'orderTags', 'orderProducts.product.thumb'))->find($id);
     if (!$order) {
         App::abort(404, 'Page not found');
     }
     $view = $this->view('order/edit');
     $view->with('orderTagsAll', Order::tagList());
     $view->with('order', $order);
     $view->with('ajaxAction', \Admin::url('shop/orders/ajax') . '/' . $order->id . '/');
     $view->with('form', \iForm::model($order));
     // $view->with('products', $order->products);
     // $view->with('products',  <? $products = OrderProduct::with('product')->where('order_id', $order->id)->get() );
     return $view;
 }