© Sanjib Sinha 2019
S. SinhaBeginning Laravel https://doi.org/10.1007/978-1-4842-4991-8_4

4. Working with Models

Sanjib Sinha1 
(1)
Howrah, West Bengal, India
 

The model is the most critical part of any web application; you could even call it the “brain” of your application. A good web application will be model-centric, with each resource being a representation of the model. In other words, the model sets the business logic for every resource, such as user, task, and so on.

In Laravel, you will usually use Eloquent ORM when building applications. Eloquent is a simple yet beautiful ActiveRecord implementation for working with a database. Each database table has a corresponding model, and without this model, you cannot query the data in the database table. ...

Get Beginning Laravel: Build Websites with Laravel 5.8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.