I'm trying to rename the timestamps columns (created_at
and updated_at
) of the user
table in my database. I have already seen this answer but when I override the CREATED_AT
and UPDATED_AD
constants like that:
class User extends Authenticatable
{
const CREATED_AT = 'user_creation_date';
const UPDATED_AT = 'user_update_date';
...
}
all it does is rename the properties of the User
model, i.e. $user->user_creation_date
and $user->user_update_date
. The database columns remain unchanged. How should I do to rename the columns of my database while keeping the auto-update feature?
Thank you for your help.