title: Format date time properly with laravel and carbon
body: <p>I try to add date and time into my database but I have problems:</p>
  
  <p>First: I create a form:</p>
  
  <pre><code>&lt;div class="row"&gt;
  &lt;div class="form-group col-md-6"&gt;
  
      {!! Form::label('roba_spremna','The cargo is ready:') !!}
      {!! Form::text('roba_spremna', null, ['class'=&gt;'form-control']) !!}
  &lt;/div&gt;
  &lt;div class="form-group col-md-6"&gt;
  
      {!! Form::label('auction_end','Auction close at:') !!}
      {!! Form::text('auction_end', null, ['class'=&gt;'form-control']) !!}
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>After that I add bootstrap-datetimepicker (js library):</p>
  
  <pre><code>$( document ).ready(function() {
                  $(function () {
                      $('#roba_spremna, #auction_end').datetimepicker();
                  });
              });
  </code></pre>
  
  <p>and at Article model I write:</p>
  
  <pre><code> protected $fillable = [
          'title',
          'body',
          'roba_spremna',
          'auction_end'
      ];
  
      protected $dates = [
          'roba_spremna',
          'auction_end'
      ];
  
      public function setRobaSpremnaAttribute($date){
          $this-&gt;attributes['roba_spremna']= Carbon::createFromFormat(''m/d/Y h:i a', $date);
      }
  </code></pre>
  
  <p>Now When I try to store date with time at my database so when I submit form I get this error:</p>
  
  <blockquote>
    <p>InvalidArgumentException in Carbon.php line 425: Unexpected data
    found. Unexpected data found. Unexpected data found. Trailing data</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/0iLh7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0iLh7.png" alt="enter image description here"></a>
  How I can solve my problem?</p>