PHP and Laravel

Use modern PHP with Laravel or Symfony, the stack behind a large share of the web.

Beginner · about 40 hours · difficulty 2/5

Learn first: HTTP in Depth

PHP powers a very large part of the web, including WordPress, and modern PHP (8.x) is a far cry from its reputation: it has types, enums, attributes, JIT compilation and a strong package manager in Composer.

Frameworks

  • Laravel: elegant, productive and full-featured. Eloquent ORM, migrations, queues, auth scaffolding and a large ecosystem.
  • Symfony: component-based and very structured; many other projects (including Laravel) use its components.

What to learn

  • PHP 8 syntax, strict types, classes, interfaces, namespaces and Composer autoloading.
  • The request lifecycle: traditionally each request starts fresh (share-nothing), which makes scaling simple but means caching and connection reuse work differently than in long-running servers.
  • Running with PHP-FPM behind Nginx, or newer long-running servers like FrankenPHP or Laravel Octane.

Pitfalls

  • Following old tutorials that build SQL with string concatenation. Always use prepared statements or the ORM.
  • Mixing HTML and business logic in one file.

You are ready to move on when you can build a Laravel or Symfony API with migrations, validation, auth and a queue-backed job.

Key concepts

  • Modern PHP 8 features
  • Composer and autoloading
  • Laravel
  • Symfony
  • PHP-FPM with Nginx
  • Eloquent ORM

Other options for this step

Mini project

Build a Laravel API for an event RSVP system with migrations, form request validation and an email notification sent from a queued job.

Check yourself

How does PHP's share-nothing request model affect how you cache data compared with a long-running Node or Go server?

Free resources