The Eloquent is an ORM (Object Relational Model) included with the Laravel. It implements the active record pattern and is used to interact with relational databases.
Table naming
The convention is to use pluralised “snake_case” for table names and singular “StudlyCase” for model names. For example:
cats
table would have a Cat
modeljungle_cats
table would have a JungleCat
modelusers
table would have a User
modelpeople
table would have a Person
modelEloquent will automatically try to bind your model with a table that has the plural of the name of the model, as stated above.
You can, however, specify a table name to override the default convention.
class User extends Model
{
protected $table = 'customers';
}