Laravel is een opensource PHP-framework waarmee webapplicaties kunnen worden ontwikkeld. Achter Laravel staat een uitgebreide community en er is uitgebreide documentatie. Niet voor niets is het naast Symfony en Yii een van de populairste PHP-frameworks van dit moment. Versie 13.0 van Laravel is kort geleden uitgekomen en uitgebreide releasenotes daarvan kunnen op deze pagina worden gevonden. Hieronder zijn de belangrijkste verbeteringen te vinden.
PHP 8.3 Is Now RequiredLaravel 13 drops support for PHP 8.2 and now requires PHP 8.3 or higher.
First-Class Support for PHP AttributesThe biggest developer-facing improvement is the introduction of native PHP Attributes across many parts of the framework. Instead of configuring behavior through class properties, you can now define things inline using attributes:
- Models
- Jobs
- Console commands
- And more (15+ locations)
This is fully optional and backward compatible.
Laravel AI SDKLaravel 13 introduces the first-party Laravel AI SDK, providing a unified API for text generation, tool-calling agents, embeddings, audio, images, and vector-store integrations.
JSON:API ResourcesLaravel now includes first-party JSON:API resources, making it straightforward to return responses compliant with the JSON:API specification. JSON:API resources handle resource object serialization, relationship inclusion, sparse fieldsets, links, and JSON:API-compliant response headers. Read more: here.
Queue RoutingLaravel 13 adds queue routing by class via
Semantic / Vector SearchQueue::route(...), allowing you to define default queue / connection routing rules for specific jobs in a central place.Laravel 13 has native vector query support, embedding workflows, and related APIs documented across search, queries, and the AI SDK. These features make it straightforward to build AI-powered search experiences using PostgreSQL + pgvector, including similarity search against embeddings generated directly from strings.
Cache::touch()PR #55954 adds a
Cache::touch()method that extends a cached item's TTL without fetching or re-storing the value. Previously, extending a TTL required agetfollowed by aput, which meant transferring the cached value over the wire unnecessarily.Cache::touch()skips that — Redis uses a singleEXPIREcommand, Memcached usesTOUCH, and the database driver issues a singleUPDATE. The method returnstrueon success andfalseif the key doesn't exist. It's implemented across all cache drivers: Array, APC, Database, DynamoDB, File, Memcached, Memoized, Null, and Redis.
