/**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     /**
      * @var $user \App\User
      */
     $user = \Auth::user();
     $order_model = $user->orderedProducts()->findOrFail($id);
     $order_model->quantity = $request->get('quantity');
     $order_model->save();
     $user = \App\Helpers\CommonHelper::getCurrentUser();
     return ['calls' => [['call' => 'updateHtmlContext', 'params' => ['#product-mini-item-' . $order_model->product_id, view('catalog.product_mini_item', ['product' => $order_model->product])->render()]], ['call' => 'updateHtmlContext', 'params' => ['#basket-mini-box', view('basket.mini_box')->render()]], ['call' => 'updateHtmlContext', 'params' => ['#basket-orders-container', view('basket.orders_items')->render()]], ['call' => 'updateHtmlContext', 'params' => ['#basket-total-sum', $user->getAmountOpenOrders()]]]];
 }
<?php

/**
 * @var $user \App\User
 */
if (!isset($user)) {
    $user = \App\Helpers\CommonHelper::getCurrentUser();
}
$open_orders_catalogs_ids_arr = $user->getOpenOrdersCatalogsIdsArr();
?>

<p>
    <button class="btn btn-link">
        <span class="glyphicon glyphicon-menu-hamburger"></span> Отобразить информацию о всех товарах
    </button>
    <a href="/deferred" class="btn btn-default">Отложенные товары</a>
    <a href="/history" class="btn btn-default">История заказов</a>
    <a href="/history" class="btn btn-primary" title="Список оплаченных заказов, ожидающих доставки" data-toggle="tooltip" data-placement="right">
        Мои заказы, ожидающие доставки
    </a>
</p>

@foreach($open_orders_catalogs_ids_arr as $open_orders_catalog_id)
    <?php 
$catalog_model = \App\Models\Catalog::find($open_orders_catalog_id);
$deferred_products = $user->deferredProducts($open_orders_catalog_id)->get();
?>
    <div class="panel panel-default">
        <div class="panel-heading">
            <div class="row">
                <div class="col-lg-9">