[Proposal] Common Timestamp Column names should be read from database config
While working on a project, I wanted all database columns to be camel case, but the created and updated columns are snake case (created_at and updated_at). I know there are constants for models that can be overrided, but I haven't found the same thing for the Schema Builder.
That being said, if the schema builder and models read the default column names from Config::get('database.columns.updated_at', UPDATED_AT), for example, then there would be more fine grained control.
You're talking about the timestamps method? You can still insert timestamps manually.
$table->timestamp('createdAt');
$table->timestamp('updatedAt');
I can but I felt it's a bit repetitious to add that to the schema and then have to define it again explicitly in the model code, since the name of these columns would generally be a constant thing.
+1. Nice feature. And easy to implement too. I am looking forward to it.
I don't want to add a config for this. Want to avoid config bloat. Just define the timestamps manually as mentioned.