Can I map Laravel's timestamps from:
created_at
to post_date
and post_date_gmt
?
updated_at
to post_modified
and post_modified_gmt
?
I'm migrating a Wordpress application to Laravel.
I'm accessing a copy of the Wordpress database using Laravel. The live version of the database is still in use so I don't want to change the schema.
The Posts table has post_date
, post_date_gmt
, post_modified
and post_modified_gmt
, but Laravel is expecting created_at
and updated_at
.
Is there anyway to change the column names that Laravel looks for?
I'd like Laravel to update the timestamps of all the columns that are already there.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…