title: Laravel - SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value
body: <p>The following is the detailed error that I am getting. I am learning to make APIs with Laravel.</p>
  <p>SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'false' for column <code>upwork_task</code>.<code>products</code>.<code>show</code> at row 1 (SQL: insert into <code>pro ducts</code> (<code>catalog_id</code>, <code>image</code>, <code>name</code>, <code>size</code>, <code>size_type</code>, <code>price</code>, <code>discounted_price</code>, <code>show</code>, <code>updated_at</code>, <code>created_at</code>) values (1, <a href="https://via.placehol" rel="nofollow noreferrer">https://via.placehol</a>
  der.com/640x480.png/00bbdd?text=clothes+quam, iPhone 14 Pro Max, 3191, liter, 3981, 2910, false, 2022-09-20 21:36:02, 2022-09-20 21:36:02))</p>
  <p>My migration file is as follows</p>
  <pre><code>Schema::create('products', function (Blueprint $table) {
              $table-&gt;id();
              $table-&gt;string('catalog_id');
              $table-&gt;string('image');
              $table-&gt;string('name');
              $table-&gt;string('size');
              $table-&gt;string('size_type');
              $table-&gt;integer('price');
              $table-&gt;integer('discounted_price')-&gt;nullable();
              $table-&gt;boolean('show');
              $table-&gt;timestamps();
          });
  </code></pre>
  <p>My factory</p>
  <pre><code>public function definition()
      {
          $show = $this-&gt;faker-&gt;randomElement(['true', 'false']);
          $size_type = $this-&gt;faker-&gt;randomElement(['ml', 'liter', 'gm', 'kg', 'oz', 'lb']);
          $status = $this-&gt;faker-&gt;randomElement(['Y', 'N']); //Y means there is discount, N means there is none
          $price = $this-&gt;faker-&gt;numberBetween($min = 10, $max = 9999);
  
          return [
              'catalog_id' =&gt; Catalog::factory(),
              'image' =&gt; $this-&gt;faker-&gt;imageUrl($width = 640, $height = 480, 'clothes'),
              'name' =&gt; 'iPhone 14 Pro Max',
              'size' =&gt; $this-&gt;faker-&gt;numberBetween($min = 10, $max = 5000),
              'size_type' =&gt; $size_type,
              'price' =&gt; $price,
              'discounted_price' =&gt; $status == 'Y' ? $this-&gt;faker-&gt;numberBetween($min = $price * 0.6, $max = $price * 0.9) : null,
              'show' =&gt; $show,
          ];
      }
  </code></pre>