title: saving number field with a value of zero in Laravel 5.5
body: <p>I have a form that accepts delivery of products which I noticed if I enter 0 in the quantity field it doesn't save in the database even if I add data in the calendar or in Notes field.</p>
  
  <p><a href="https://i.stack.imgur.com/zoSNl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zoSNl.png" alt="enter image description here"></a></p>
  
  <p>I already commented out the <code>\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,</code>iin kernel.php still doesn't work.</p>
  
  <p>how can I forced laravel to save my data even if I want to put 0 in quantity? thanks in advance! </p>
  
  <p><strong>update</strong></p>
  
  <pre><code>public function store(Request $request)
  {
      $input = $request-&gt;all();
  
      $items = [];
  
      for ($i = 0; $i &lt;= count($input['order_id']); $i++) {
  
          if (empty($input['stock_in_qty'][$i]) || !is_numeric($input['stock_in_qty'][$i])) continue;
  
          $acceptItem = [
              'order_id'      =&gt; $input['order_id'][$i],
              'product_id'    =&gt; $input['product_id'][$i],
              'order_item_id' =&gt; $input['order_item_id'][$i],
              'delivery_date' =&gt; $input['delivery_date'][$i],
              'company_id'    =&gt; $input['company_id'][$i],
              // 'stock_in_qty' =&gt; intval($input['stock_in_qty'])[$i],
              'stock_in_qty'  =&gt; $input['stock_in_qty'][$i],
              // 'stock_out_qty' =&gt; $input['stock_out_qty'][$i],
              // 'transfer_to' =&gt; $input['transfer_to'][$i],
              'delivery_note' =&gt; $input['delivery_note'][$i],
              'user_id'       =&gt; $input['user_id'][$i],
          ];
          array_push($items, Warehouse1stocks::create($acceptItem));
  
          $stockSummary = Warehouse1StockSummaries::firstOrCreate(
              ['product_id' =&gt; $input['product_id'][$i]],
              ['qty_in'  =&gt; $input['stock_in_qty'][$i],
               'qty_out' =&gt; null,
              ]);
  
          if (!$stockSummary-&gt;wasRecentlyCreated) {
              $stockSummary-&gt;increment('qty_in', $input['stock_in_qty'][$i]);
          }
      }
  
      if ($input['rd'] == $input['stock_in_qty'] || $input['rd'] == 0) {
          $order_idAcceptedItem = $acceptItem['order_id'];
          $setStatus = \App\Orders::where('id', '=', $order_idAcceptedItem)-&gt;first();
          if ($setStatus) {
              $setStatus-&gt;status_id = 4;
          }
          $setStatus-&gt;save();
      } else {
          $order_idAcceptedItem = $acceptItem['order_id'];
          $setStatus = \App\Orders::where('id', '=', $order_idAcceptedItem)-&gt;first();
          if ($setStatus) {
              $setStatus-&gt;status_id = 3;
          }
          $setStatus-&gt;save();
      }
  
      return redirect()-&gt;route('orders.index');
  }
  </code></pre>