API Platform Laravel
summary
API Platform 4 adds first-class Laravel support: install with composer require api-platform/laravel and a default /api route serves Swagger UI and an OpenAPI spec with zero app code. It maps Eloquent models using #[ApiResource], auto-registers REST routes, and generates metadata by running an introspection SQL query (cached to a PHP file for production). GraphQL, CSV, JSON-LD, filters, pagination, Laravel auth, Octane/FrankenPHP compatibility and migrations are supported and demonstrated working end-to-end.
AI-written summary · about
chapters (17)
- 0:00Introduction and welcome
- 2:21API Platform 4 Laravel support
- 8:38Standalone API Platform core
- 12:01Laravel package structure
- 15:23Eloquent ORM in Laravel
- 20:49Two-line API setup demo
- 25:57Metadata and introspection
- 27:04API standards and security
- 30:25GraphQL support
- 31:28Field visibility and filters
- 34:08Configuration and operations
- 35:14Authentication in Laravel
- 35:58Data validation
- 37:26Authorization policies
- 37:50Performance with Octane
- 39:01Real-time updates with Mercure
- 40:12Community and future
