You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does it make sense to recommend database naming in context of PHP framework?
May be this is confusing for less experienced developers?
And implies violation of best practices, if database is already designed using singular naming style?
thanks for your message. Best practices aren't about excluding options but to guide when in doubt. You can still have singular table names if this is needed or by choice. It's purely seen as a recommendation (and default, if auto-generated via the framework).
It makes absolutely sense. There is a principle to follow, "Convention over Configuration", meaning there are certain practices in naming that are spected in case of no other requirements. That is translated, among other benefits, to avoid the need of being absolutely declarative, because of the standarized spected defaults in naming of every artifact involved in the database schema, keeping you DRY.
Anyway, as @spekulatius said, the framework allows to override those conventions.
about "Does it means that singular naming at database is not good for Laravel?"... Laravel can handle that case without issues, but you have to be declarative giving the table name in the model declaration, so it's not bad for Laravel. If there is a convention in the DB Schema different from the used by Laravel, probably the behavoir of models can be patched if you know the basics of the model's implementation.
Does it make sense to recommend database naming in context of PHP framework?
May be this is confusing for less experienced developers?
And implies violation of best practices, if database is already designed using singular naming style?
Are these practices of database naming possible, if database is already designed using singular naming style?
https://github.com/alexeymezenin/laravel-best-practices#follow-laravel-naming-conventions
Does it means that singular naming at database is not good for Laravel?
The text was updated successfully, but these errors were encountered: