title: What is the difference between attributesToArray() and toArray() in Laravel?
body: <p>Can someone explain the difference between <code>$model-&gt;attributesToArray()</code> and <code>$model-&gt;toArray()</code> on a model?</p>
  
  <p>I have an issue where a seeder is throwing an error about <code>getCreatedAtAttribute</code> method is not defined and it's complaining due to a <code>toArray()</code> method call. This is what prompted me to try and find out the difference between the two.</p>
  
  <p>After switching to <code>attributesToArray()</code> the seeder runs fine.</p>