I have a created_at column in my user model that I would like to format differently when accessing it in my blade template, so it is more readable. It seems like the best way to go about this is to use a cast.
I created a cast like so:
protected $casts = [
'email_verified_at' => 'datetime',
'created_at' => 'm-d-y',
];
... in my controller, I am getting a User and then doing:
dd($member->toArray());
Now, when getting a user record and doing $user->toArray()
the created_at column is still in the original uncasted format, it seems the cast isn't being used at all, any idea why this is?