title: Laravel allowing null dates on Model::create() but not Model->update()
body: <p>I have setup my Laravel migration to allow <code>nullable</code> dates for my StartTime and EndTime entries as such:</p>
  <pre><code>$table-&gt;dateTime( 'StartTime' )-&gt;nullable();
  $table-&gt;dateTime( 'EndTime' )-&gt;nullable();
  </code></pre>
  <p>When I create a new entry through eloquent, it allows me to insert <code>null</code> values into my database successfully:</p>
  <pre><code>try {
  
      // Create the new Campaign record
      $campaign = Campaign::create( $request-&gt;all() );
  
  }
  
  
  +----+-------+--------+-----------+---------+---------------------+
  | Id | Name  | Active | StartTime | EndTime | created_at          |
  +----+-------+--------+-----------+---------+---------------------+
  |  1 | Test2 |      0 | NULL      | NULL    | 2020-07-02 22:01:22 |
  +----+-------+--------+-----------+---------+---------------------+
  1 row in set (0.00 sec)
  </code></pre>
  <p>However, when I later try and update my record using eloquent and still passing a <code>null</code> value for StartTime, it throws an error:</p>
  <pre><code>try {
  
      // Get a reference to the campaign
      $campaign = Campaign::find( $id );
              
      // Update the campaign
      $campaign-&gt;update( $request-&gt;all() );
  
  }
  
  
  (22007) SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: 'null' for column 'StartTime' at row 1
  </code></pre>
  <p>In the case of the <code>create</code> method, I am not passing in a StartTime value at all, but in the case of the <code>update</code> method, I am simply passing back the <code>null</code> value that Laravel returns as part of the model. So in other words, I haven't altered the value of StartTime at all, I've simply just passed <code>$campaign</code> back to Laravel for the update.</p>
  <p>So it seems that Laravel is assigning the <code>nullable()</code> upon insert of a new entry into the database, but will not allow me to pass a <code>null</code> value back for the update.</p>
  <p>Am I missing something here?  I can't seem to find a solution to this anywhere.</p>
  <p><strong>UPDATE</strong></p>
  <p>Okay, so further investigation seems like my problem is stemming from the AngularJS <code>$http</code> POST request. For troubleshooting purposes, I added code to my Laravel controller to alter the StartTime to <code>null</code>:</p>
  <pre><code>if( $request-&gt;StartTime === 'null' ) {
  
     $request['StartTime'] = null;
  
  }
  </code></pre>
  <p>And that worked. So it looks like Angular is passing the <code>null</code> value back in the request as <code>'null'</code></p>