I remember hearing you should name your controllers, models and views in a special way. Either singular or plural. I don't remember which ones to name what though, and i can't find anything about it in the doc.
I'm guessing it's like this:
- Controllers are plural
- Views are plural
- Models are singular
Am i on the right track?
I understand it's just a convention and you don't have to follow them, but i still want to know what the right way is.
The convention is:
I couldn't find the convention for controller names defined in the documentation, but all documented examples place the controller resource name in the singular.
From the Laravel 5.5 documentation :
By convention, the "snake case", plural name of the class will be used as the table name unless another name is explicitly specified... Eloquent will assume the Flight model stores records in the flights table
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With