Rename or change default timestamps created_at, updated_at – Laravel
Best method to change Laravel’s default timestamps:
Step 1: Override const in specific model like:
const CREATED_AT = ‘created’;
const UPDATED_AT = ‘updated’;
Then getCreatedAtColumn
and getUpdatedAtColumn
Methods will return newly assigned names
Leave a Reply