When using laravel models, how do you usually name table names and model names like uncountable nouns like goods?

the general table name uses the goods, model name and also uses goods, and then sets the $table property?

Apr.25,2021

table name: goods
model name: Goods

there is no need to struggle too much


use Good in general Models, and then set it in it protected $tableName = 'goods' , generally not. Laravel default resource is plural, so it will automatically add a s.

.
Menu