๐ Laravel 13.35: New QUERY Routes, Smarter Model Defaults & Queue Improvements
Laravel continues its rapid release cycle with Laravel 13.35, released on October 7, 2026.
While this isn't a massive framework overhaul, it contains several practical improvements that can make everyday Laravel development cleaner and more flexible.
The release introduces a new Route::query() method, dynamic model defaults, improved testing assertions, percentage-based queue memory limits, and scheduler improvements for multi-server deployments.
Let's take a closer look. ๐
๐ 1. Route::query() Makes HTTP QUERY Routes Easier
One of the most interesting additions in Laravel 13.35 is:
Route::query('/products/search', SearchProductsController::class);
This registers a route for the HTTP QUERY method.
The QUERY method is designed for requests that need to send query information in a request body while remaining safe and idempotent.
This can be useful when a search request contains a large or complex set of filters that would be awkward to encode entirely into a URL.
For example, imagine an advanced product search:
{
"categories": ["laptops", "monitors"],
"brands": ["Dell", "Lenovo"],
"price": {
"min": 500,
"max": 2000
},
"features": [
"16GB RAM",
"SSD",
"Wi-Fi 6"
]
}
Putting a large structure like this into a traditional query string can quickly become difficult to manage.
With a QUERY request, the filtering information can be sent as the request body.
๐ง Why QUERY Can Be Useful
Traditional search endpoints often look like:
GET /products?category=laptops&brand=dell&ram=16gb
That works perfectly for simple searches.
But advanced applications can eventually end up with:
GET /products? category=laptops& brand=dell,lenovo& price_min=500& price_max=2000& features=16gb,ssd,wifi6& availability=...
At some point, a structured request body becomes much easier to work with.
Laravel 13.35 makes registering such routes straightforward:
Route::query(
'/products/search',
SearchProductsController::class
);
Laravel's current routing documentation now lists query() alongside the standard HTTP route methods.
โ ๏ธ Don't Forget CSRF Protection
There is an important security detail.
When a QUERY route is placed in Laravel's web middleware group, it remains subject to CSRF protection.
That means a browser-based QUERY request may require a CSRF token just like other state-sensitive requests handled by the web middleware stack.
So don't treat QUERY as a shortcut for bypassing Laravel's security mechanisms.
Always design the endpoint according to the application's authentication and authorization requirements. ๐
๐๏ธ 2. Dynamic Eloquent Model Defaults
Another useful Laravel 13.35 feature is the new defaults() method for Eloquent models.
Previously, developers could define static default attributes using $attributes.
For example:
class Subscription extends Model
{
protected $attributes = [
'cancelled' => false,
'trial_days' => 14,
];
}
That's useful when the default value never changes.
But what if the default depends on configuration, a feature flag, or the current date?
That's where the new defaults() method becomes useful.
โจ Dynamic Defaults Example
Laravel 13.35 introduces an opt-in HasDefaultAttributes trait:
use Illuminate\Database\Eloquent\Concerns\HasDefaultAttributes;
class Subscription extends Model
{
use HasDefaultAttributes;
protected function defaults(): array
{
return [
'cancelled' => false,
'trial_days' => Feature::active('extended-trials')
? 30
: 14,
];
}
}
Now the default can be calculated dynamically.
This opens up interesting possibilities.
For example:
protected function defaults(): array
{
return [
'status' => 'active',
'country' => config('app.default_country'),
'trial_ends_at' => now()->addDays(14),
];
}
Instead of hard-coding every value into $attributes, your model can determine defaults at runtime.
๐ฏ Where Dynamic Defaults Could Help
This feature can be useful for:
- ๐ Feature flags
- โ๏ธ Configuration-driven values
- ๐ Date-based defaults
- ๐ Localization
- ๐ข Multi-tenant applications
- ๐งช Testing environments
- ๐ E-commerce applications
- ๐ Subscription systems
For example, a SaaS application could give different trial periods to different customers based on a feature configuration.
๐งช 3. Better Fake Assertions
Laravel 13.35 also improves testing capabilities.
Property arrays can now be used with queue, bus, event, and notification fake assertions.
This can make tests easier to read when you're checking specific properties on dispatched objects.
For example, instead of writing complicated callback logic for every assertion, you can express the expected properties more directly.
This may seem like a small improvement, but testing APIs are used constantly in a Laravel project.
Small improvements here can save developers time across hundreds of tests. ๐งช
๐พ 4. Percentage-Based Queue Memory Limits
Queue workers can consume memory over time.
Traditionally, Laravel developers can configure a worker with a fixed memory limit.
Laravel 13.35 adds support for percentage-based memory limits for queue:work.
This is interesting for environments where the available memory differs between machines.
For example, a development server might have:
4 GB RAM
while production might have:
16 GB RAM
A percentage-based limit can adapt to the available memory rather than relying on the same absolute number everywhere.
This can make queue configuration more flexible across different environments. โก
๐ฅ๏ธ 5. Better Scheduler Support for Multi-Server Applications
Laravel 13.35 also includes scheduler improvements aimed at multi-server environments and deployments.
This is particularly relevant for applications running across multiple servers.
Imagine:
Load Balancer
โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โ โ โ
Server 1 Server 2 Server 3
โ โ โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โ
Laravel App
When scheduled tasks are involved, developers need to think carefully about whether a scheduled operation should run once or on every server.
Scheduler improvements can help teams build more predictable deployment and scheduling workflows.
๐ฆ 6. Laravel 13 Is Evolving Quickly
Laravel 13.35 is another example of how Laravel is shipping useful improvements continuously rather than waiting for another major version.
Recent Laravel 13 releases have introduced improvements across:
- โ๏ธ Queue management
- ๐ก Broadcasting
- ๐๏ธ Database operations
- ๐ง AI capabilities
- ๐ผ๏ธ Image processing
- ๐ Search
- ๐งช Testing
- ๐ ๏ธ Developer tooling
The 13.x release cycle has been moving quickly, with frequent releases throughout 2026.
For developers, this means staying reasonably current can provide access to useful improvements without waiting months for a major framework release.
๐ Should You Upgrade to Laravel 13.35?
If you're already running Laravel 13, upgrading to the latest 13.x release is generally worth evaluating.
Before upgrading a production application, however, follow a controlled process.
1. ๐พ Back Up Your Application
Make sure your database and important application data are backed up.
2. ๐ฆ Update Dependencies
Run your Composer update process in development first.
composer update
3. ๐งช Run Your Tests
Use:
php artisan test
Pay particular attention to:
- Authentication
- APIs
- Queues
- Scheduled tasks
- Database operations
- Notifications
- Payments
- External integrations
4. ๐ Review the Changelog
Don't blindly update a production application.
Review the Laravel release changes and check whether your application uses any affected functionality.
5. ๐ Deploy to Staging
Test the updated application in an environment similar to production.
6. ๐ Monitor After Deployment
After deploying, monitor:
- Application errors
- Queue failures
- Slow requests
- Scheduled tasks
- Database performance
- Memory usage
A framework update should be treated like any other production change.
๐ก A Practical Example
Imagine you're building an e-commerce application.
Your product search currently supports:
GET /products?category=laptops
As the application grows, customers want more advanced filtering.
You could eventually have filters for:
Category Brand Price RAM Storage Display Processor Operating System Availability Rating
Instead of creating an enormous query string, you could use a QUERY endpoint:
Route::query(
'/products/search',
SearchProductsController::class
);
The request body can then contain structured filtering information.
At the same time, your Eloquent models can use dynamic defaults for things such as product status, subscription configuration, or tenant-specific settings.
These are relatively small framework features, but together they can make a growing application easier to maintain.
๐ Why Small Framework Improvements Matter
Not every important framework improvement needs to be revolutionary.
A feature like:
Route::query(...)
may look tiny.
A method like:
protected function defaults(): array
may look even smaller.
But developers use these APIs repeatedly.
When small improvements remove repetitive code, improve readability, or make common tasks easier, the benefits accumulate across an entire codebase.
That's one of the strengths of Laravel's incremental release model. โจ
๐ฏ Final Thoughts
Laravel 13.35 is a practical release focused on everyday developer experience.
The standout improvements include:
- ๐
Route::query()for HTTP QUERY routes - ๐ง Dynamic Eloquent
defaults() - ๐งช Better fake assertions
- ๐พ Percentage-based queue memory limits
- โฐ Scheduler improvements for multi-server environments
None of these features require you to completely redesign an application.
Instead, they give Laravel developers better tools for solving common problems.
If you're already using Laravel 13, it's worth reviewing the 13.35 changes and testing the upgrade in your development environment.
And if you're starting a new Laravel project, these improvements are another reminder that the framework continues to evolve rapidly.
Small features. Cleaner code. Better developer experience. That's the beauty of a healthy framework ecosystem. ๐๐ป
forum Discussion & Comments 0
rate_review Leave a Comment