title: why my database still showing 2147483647 error?
body: <p>I have problem with my database due to the <code>capacity</code> of the <code>variable</code>.
  So, I changed my <code>id</code> from <code>integer</code> to <code>bigInteger</code> as show below. <code>id</code> will be storing barcode number.</p>
  
  <pre><code>class CreateItemsTable extends Migration
  {
  public function up()
  {
      Schema::create('items', function (Blueprint $table) {
          $table-&gt;bigInteger('id')-&gt;unsigned();
          $table-&gt;string('name',100);
          $table-&gt;decimal('buying_price', 5, 2);
          $table-&gt;timestamps();
      });
  }
  </code></pre>
  
  <p>However, when I try to access the item table from other controller, the page shows this error</p>
  
  <blockquote>
    <p>No query results for model [App\Item] 2147483647</p>
  </blockquote>
  
  <p>This is how my <code>controller</code> looks like. I want to make my <code>item_id</code> for <code>order</code> <code>equal</code> to <code>item-&gt;id</code>.</p>
  
  <pre><code>  public function store(Request $request)
    {
      $this-&gt;validate($request, [
          'item_id'=&gt;'required|integer',
          'quantity'=&gt;'required|integer',
      ]);
  
      $item=Item::FindOrFail($request-&gt;item_id);
  
      $order=new Order;
      $order-&gt;status=$request-&gt;get('status');
      $order-&gt;item_id=$item-&gt;id;
      if ($request-&gt;get('status')=='Complete') {
          $item-&gt;quantity += $request-&gt;input('quantity');
      }
      $order-&gt;quantity=$request-&gt;input('quantity');
  
      $order-&gt;save();
      $item-&gt;save();
  
      return redirect('/Order')-&gt;with('success','Order added');
  }
  </code></pre>