
Laravel Database Queries: Query Builder to Eloquent
A step-by-step guide to Laravel database queries, from raw SQL and the query builder to Eloquent, joins, pagination and transactions.
4 posts about Laravel: questions with answers, tutorials and articles, newest first.

A step-by-step guide to Laravel database queries, from raw SQL and the query builder to Eloquent, joins, pagination and transactions.

See common raw SQL queries next to their Laravel Eloquent equivalents, including joins, aggregates, eager loading and safe raw expressions.

The naming conventions Laravel and Eloquent expect for tables, keys, models, controllers, routes and migrations, with examples.

Step-by-step Laravel installation for new and existing projects, covering Composer, environment setup, migrations and a React Axios example.