public function getCreatedAtAttribute($date) { $date = new \Carbon\Carbon($date); // Now modify and return the date return $date->toRfc1123String(); }