Laravel Introduction


Example

Eloquent is the ORM built into the Laravel framework. It allows you to interact with your database tables in an object-oriented manner, by use of the ActiveRecord pattern.

A single model class usually maps to a single database table, and also relationships of different types (one-to-one, one-to-many, many-to-many, polymorphic) can be defined between different model classes.

Section Making a Model describes the creation and definition of model classes.

Before you can start using Eloquent models, make sure at least one database connection has been configured in your config/database.php configuration file.

To understand usage of eloquent query builder during development you may use php artisan ide-helper:generate command. Here is the link.


Sub-topic Navigation

Eloquent Relationship