title: SQLSTATE[HY000]: General error: 1364 Field 'image' doesn't have a default value
body: <p>I've decided to not use image in my create menu page but then I got this error &quot;SQLSTATE[HY000]: General error: 1364 Field 'image' doesn't have a default value&quot;.</p>
  <p>This is the MenuController:</p>
  <pre><code> public function store(Request $request, Menu $menu)
  {
      $data = array();
      $data['name'] = $request-&gt;name;
      $data['slug'] = $request-&gt;slug;
      $data['price'] = $request-&gt;price;
      $data['status'] = $request-&gt;status;
  
      $menu = DB::table('menus')-&gt;insert($data);
  
      return redirect()-&gt;route('admin.menu.index');
  }
  </code></pre>
  <p>and the add.blade.php:</p>
  <pre><code> &lt;form action=&quot;{{ route('admin.menu.store') }}&quot; method=&quot;POST&quot; enctype=&quot;multipart/form-data&quot;&gt;
                  @csrf
                  &lt;div class=&quot;form-group row&quot;&gt;
                      &lt;label for=&quot;staticEmail&quot; class=&quot;col-sm-2 col-form-label&quot;&gt;Name&lt;/label&gt;
                      &lt;div class=&quot;col-sm-10&quot;&gt;
                          &lt;input type=&quot;text&quot; class=&quot;form-control&quot; name=&quot;name&quot; id=&quot;name&quot; required value=&quot;{{ old('name') }}&quot;&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-group row&quot;&gt;
                      &lt;label for=&quot;staticprice&quot; class=&quot;col-sm-2 col-form-label&quot;&gt;Price&lt;/label&gt;
                      &lt;div class=&quot;col-sm-10&quot;&gt;
                          &lt;input type=&quot;text&quot; class=&quot;form-control&quot; name=&quot;price&quot; id=&quot;price&quot; required value=&quot;{{ old('price') }}&quot;&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-group row&quot;&gt;
                      &lt;label for=&quot;staticprice&quot; class=&quot;col-sm-2 col-form-label&quot;&gt;Status&lt;/label&gt;
                      &lt;div class=&quot;col-sm-10&quot;&gt;
                          &lt;input type=&quot;radio&quot; name=&quot;status&quot; value=&quot;1&quot; /&gt; Active
                          &lt;input type=&quot;radio&quot; name=&quot;status&quot; value=&quot;0&quot; /&gt; Not Active
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;input id=&quot;slug&quot; name=&quot;slug&quot; type=&quot;hidden&quot; value=&quot;Menu-{{ rand(100,999)}}&quot; /&gt;
                  &lt;button type=&quot;submit&quot; class=&quot;btn btn-secondary&quot; style=&quot;margin-top: 20px; width: 100%&quot;&gt;Submit&lt;/button&gt;
              &lt;/form&gt;
  </code></pre>
  <p>I don't know where did I do wrong.</p>