Eloquent ORM
Refresher on the concept of Eloquent ORM in Laravel.
Introduction
The Laravel framework has a built-in object-relational mapper (ORM) called Eloquent. The Eloquent ORM makes it easy to interact with the application database using an expressive syntax. When using the Eloquent ORM, each database table has a corresponding Model that interacts with that database table.
Model classes
The make:model
artisan command generates a model class and places it in the app\Models directory
. Model classes extend the Illuminate\Database\Eloquent\Model
class.
php artisan make:model Post
We can generate a database migration when creating the model using ...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy