Database

Part 2 of the Laravel course. Migrations, Eloquent models, relationships, the query builder, and seeders and factories: the tables and the rows behind the pages.

The cards below open the lessons of the part, and the tree lists them in the reading order of the whole course. The previous and the next page at the bottom move through that order.

2.1 Migrations How to create tables with migrations, run them, and roll them back. Open 2.2 Eloquent models How to define Eloquent models and create, find, update, and delete rows. Open 2.3 Relationships How to link models with HasMany and BelongsTo, load them eagerly, and save related rows. Open 2.4 Query builder How to read rows with the query builder using where, order, limit, first, and find. Open 2.5 Seeders and factories Seeders and factories fill a fresh Laravel database with predictable sample data. Open

Lessons