title: SQLSTATE[HY000]: General error: 1364 Field 'firstname' doesn't have a default value (SQL: insert into `users` (`email`) values (test@test.com))
body: <p>I am new to Laravel framework. </p>
  
  <p>I am facing an issue, with migration of User table.I added nullable to 'firstname' of my table, which works but displaying the same error for 'lastname'column. I have included nullable() to every column, which is not the right way to do it. How to solve this?? Can anyone please suggest.</p>
  
  <p>User migration table, facing issue with the 'firstname' column.
  <strong>create_user_table.php</strong>    </p>
  
  <pre><code>public function up()
  {
      Schema::create('users', function (Blueprint $table) {
          $table-&gt;id();
          $table-&gt;string('firstname');
          $table-&gt;string('lastname');
          $table-&gt;string('email')-&gt;unique();
          $table-&gt;date('dob');
          $table-&gt;char('address',100);
          $table-&gt;bigInteger('phonenumber');
      });
  }
  </code></pre>
  
  <p>UserController with store
      <strong>UserController.php</strong></p>
  
  <pre><code>    public function store(Request $request)
          {
              $request-&gt;validate([
                  'firstname'=&gt;'required',
                  'lastname'=&gt;'required',
                  'email'=&gt;'required',
              ]);
  
              $user=new User([
                  $user-&gt;firstname=&gt;$request-&gt;get('firstname'),
                  'lastname'=&gt;$request-&gt;get('lastname'),
                  'email'=&gt;$request-&gt;get('email'),
                  'dob'=&gt;$request-&gt;get('dob'),
                  'address'=&gt;$request-&gt;get('address'),
                  'phonenumber'=&gt;$request-&gt;get('phonenumber')
                  ]);
                  $user-&gt;save();
                  return redirect('/users')-&gt;with('success','user added');
          }
  </code></pre>