Answer the question
In order to leave comments, you need to log in
What is the name of the model in this case?
How to name Eloquent model for pricing details? For example, there is some kind of product (Product model), the product has its own pricing details. What is the correct name - PriceDetail or PriceDetails ? It’s just that usually models in Laravel are called in the singular
PriceDetails sounds good, but if you translate PriceDetail into Russian, you get a “price detail”, somehow not very good, right? I understand, the question is childish, but I want to polish the code.
Answer the question
In order to leave comments, you need to log in
For example, in English the words "news" and "news" are denoted by one news. News is always singular. Therefore, the "News" model.
That is, you can safely name the model as PriceDetails, or choose a synonym.
PS Community naming conventions:
https://github.com/alexeymezenin/laravel-best-prac...
Depends on whether there is one detail or many. For example, if PriceDetail has key-value pairs, then it is a single number, but if it is a set of hardcoded parameters and a one-to-one relationship, then PriceDetails is more logical.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question