Skip to content

Laravel

The most complete, batteries-included PHP web framework.

Backend Framework

Laravel provides routing, an ORM (Eloquent), templating (Blade), queues, caching, authentication scaffolding, and much more out of the box — the goal is that a solo developer or small team can build a full application without assembling a dozen separate libraries. It's the dominant framework in the PHP ecosystem and has a large, well-documented community around it.

When to use it

  • You want a batteries-included framework that minimizes the number of separate decisions (ORM, auth, queues, mail) you have to make
  • You're building a traditional server-rendered web app, possibly paired with Inertia.js or Livewire for interactivity without a separate frontend SPA
  • You value Laravel's documentation and conventions — it's often cited as one of the most approachable full frameworks to learn
  • You're already in the PHP ecosystem and want the most productive option within it

Considerations

  • Being fully-featured means a larger framework to learn than a minimal router-only library
  • Eloquent's 'active record' pattern is convenient but can encourage business logic creeping into models if you're not disciplined
  • Like any PHP app, understand the shared-nothing request model — long-running background work goes through Laravel's queue system, not in-process background threads

Key concepts

Eloquent ORM

An active-record ORM — each model class maps to a database table and carries its own query/persistence methods.

Artisan

Laravel's command-line tool for scaffolding, migrations, queue workers, and custom commands.

Blade

Laravel's templating engine for server-rendered views, with lightweight directives layered on plain PHP.

Migrations

Version-controlled, code-defined database schema changes — run with php artisan migrate.

Getting started

composer create-project laravel/laravel my-app

Scaffold a new Laravel project.

cd my-app && php artisan serve

Start the local development server.

Common mistakes

  • Letting business logic accumulate inside Eloquent models because the active-record pattern makes it convenient — without discipline, models become a dumping ground instead of staying focused on data access.
  • Running long background work in-process instead of through Laravel's queue system — PHP's request lifecycle doesn't support long-running in-process background threads the way Node does.
  • Skipping migrations in favor of manual database changes — loses the version-controlled, reproducible schema history php artisan migrate is designed to provide.

Ecosystem

Eloquent (ORM, built-in)Inertia.js / Livewire (SPA-like interactivity)Laravel Forge / Vapor (deployment)Pest / PHPUnit (testing)

This guide states trade-offs, not a single "best" answer — the right choice depends on your team, constraints, and existing stack.