title: Laravel - Change date format from form before update
body: <p>I'm using laravel and backpack, and I'm trying to change the format of a date field from yyyy-mm-dd to mm/dd/yyyy before I save it to the database. I know that this is not a real date format by database standards, but unfortunately I have no choice. Here is my date field:</p>
  
  <pre><code>&lt;!-- Date--&gt;
          @php
              $ISODate = \Carbon\Carbon::parse($entry-&gt;DATE)-&gt;format('Y-m-d');
          @endphp
         &lt;div class="form-group col-md-12"&gt;
          &lt;label&gt;Date&lt;/label&gt;
              &lt;input
              type="date"
              name="DATE"
              id="DATE"
              value= "{{ $ISODate }}"
              class="form-control"
          &gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>Here is the update function in the controller:</p>
  
  <pre><code> public function update(UpdateRequest $request)
  {
      $this-&gt;crud-&gt;hasAccessOrFail('update');
  
      // fallback to global request instance
      if (is_null($request)) {
          $request = \Request::instance();
      }
  
      // update the row in the db
      $item = $this-&gt;crud-&gt;update($request-&gt;get($this-&gt;crud-&gt;model-&gt;getKeyName()),
                          $request-&gt;except('save_action', '_token', '_method'));
      $this-&gt;data['entry'] = $this-&gt;crud-&gt;entry = $item;
  
      // show a success message
      \Alert::success(trans('backpack::crud.update_success'))-&gt;flash();
  
      // your additional operations before save here
  
      $item-&gt;DATE = Carbon::parse($item-&gt;DATE)-&gt;format('d/m/Y');
  
  
      $redirect_location = parent::updateCrud($request);
      // your additional operations after save here
      // use $this-&gt;data['entry'] or $this-&gt;crud-&gt;entry
      return $redirect_location;
  }
  </code></pre>
  
  <p>This correctly parses the input date from mm/dd/YYYY to YYYY-mm-dd required for the browser's datepicker. This code also updates the column in the database, but it is still in the ISO format. It does not produce any errors.</p>
  
  <p>What is the best way to convert the date format before saving the row or updating immediately after saving, etc.</p>
  
  <p>Thank you</p>