title: Laravel error : Call to a member function format() on string
body: <p>i'm using Laravel 5.6 and i want to make an accessor in my Utility model like this </p>
  
  <pre><code>public function getRekomtekDateAttribute($value)
  {
      return $value-&gt;format('d-m-Y');
  }
  </code></pre>
  
  <p>but when i call <code>{{ $utility-&gt;rekomtek_date }}</code> the error, as in the title, shown</p>
  
  <p>i've added this line in the same model, as in <a href="https://stackoverflow.com/questions/40533377/laravel-error-call-to-a-member-function-format-on-string">Laravel error: Call to a member function format() on string</a> , but still no luck</p>
  
  <pre><code>/**
   * The attributes that should be mutated to dates.
   *
   * @var array
   */
  protected $dates = [
      'rekomtek_date'
  ];
  </code></pre>
  
  <p>i don't know what's wrong. since i was using Laravel 5.3 this always occur -_-'</p>