What's New in Laravel 13.36: Rule Builders &amp; More | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://msaied.com) - [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [About](https://msaied.com#about)

           [  Contact](https://msaied.com#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://msaied.com)
- [ProjectsCase studies](https://msaied.com/projects)
- [ArticlesEngineering notes](https://msaied.com/articles)
- [CertificatesCredentials](https://msaied.com/certificates)
- [AboutHow I work](https://msaied.com#about)
- [ContactGet in touch](https://msaied.com#contact)

  [Start a conversation](https://msaied.com#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://msaied.com)
2. /
3. [Articles](https://msaied.com/articles)
4. /
5. [Laravel](https://msaied.com/articles?category=laravel)
6. /
7. Rule Builders for Every Validation Rule in Laravel 13.36

   [Laravel](https://msaied.com/articles?category=laravel) 

 Rule Builders for Every Validation Rule in Laravel 13.36
=========================================================

 Laravel 13.36 ships Rule:: builders for every remaining validation rule, DB::olap() for PlanetScale/Vitess, sticky connection resets between queue jobs, synchronous Mercure broadcasts, and several bug fixes.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://msaied.com#person) Published 14 Oct 2026 · Updated 15 Oct 2026 · 4 min read

ShareCopy linkCopied

 ![Rule Builders for Every Validation Rule in Laravel 13.36](https://cdn.msaied.com/781/c4463b384b964fd45e6f3cfa00f8e95c.png) 

  On this page +1. [What's New in Laravel 13.36](#whats-new-in-laravel-1336)
2. [Rule Builders for Every Remaining Validation Rule](#rule-builders-for-every-remaining-validation-rule)
3. [DB::olap() for PlanetScale and Vitess](#dbolap-for-planetscale-and-vitess)
4. [Reset Sticky Connections Between Queue Jobs](#reset-sticky-connections-between-queue-jobs)
5. [Mercure Broadcasts Are Now Synchronous by Default](#mercure-broadcasts-are-now-synchronous-by-default)
6. [DeleteWhenMissingModels and FailOnTimeout on Queued Mailables](#deletewhenmissingmodels-and-failontimeout-on-queued-mailables)
7. [Escaping Fix in Markdown Mail](#escaping-fix-in-markdown-mail)
8. [Key Takeaways](#key-takeaways)

 What's New in Laravel 13.36
---------------------------

The Laravel team released **v13.36.0** on October 14, 2026, packed with developer-experience improvements, database enhancements, and important bug fixes. Here is a breakdown of the most significant changes.

---

Rule Builders for Every Remaining Validation Rule
-------------------------------------------------

Contributor [@ericmp33](https://github.com/ericmp33) closed a long-standing gap by adding a `Rule::` method for every validation rule that previously only had a string-based syntax. Rules like `required_with`, `accepted_if`, `url`, `uuid`, and `distinct` can now be written fluently — giving your IDE full autocomplete support.

```php
use Illuminate\Validation\Rule;

$request->validate([
    'phone'     => [Rule::requiredWithout('email')],
    'website'   => ['nullable', Rule::url()->protocols(['https'])],
    'device_id' => [Rule::uuid()->version(4)],
    'tags.*'    => [Rule::distinct()->ignoreCase()],
    'password'  => ['required', Rule::confirmed()],
]);

```

Simple rules with no parameters (e.g., `Rule::required()`, `Rule::nullable()`) return the plain rule string. Rules that accept field names or values return an object, which means a value containing a comma is no longer accidentally split into two separate rules. The PR also adds an `equals()` method to the fluent `Rule::date()` builder.

---

DB::olap() for PlanetScale and Vitess
-------------------------------------

PlanetScale runs on Vitess, which caps queries at 100,000 rows in its default OLTP workload. The new `DB::olap()` method switches to the OLAP workload for the duration of a callback, then switches back automatically.

```php
$revenue = DB::olap(fn () => Order::query()
    ->selectRaw('customer_id, sum(total) as revenue')
    ->where('created_at', '>=', now()->subYears(3))
    ->groupBy('customer_id')
    ->get()
);

```

The method sets the workload on both read and write connections. On a non-Vitess database it simply executes the callback, so the same code works against a local MySQL instance without any changes.

---

Reset Sticky Connections Between Queue Jobs
-------------------------------------------

When `sticky` is enabled on a read/write connection, any write operation routes subsequent reads to the write connection. Because a queue worker is a long-running process, a single job that writes could inadvertently send every later job's reads to the write connection. A new opt-in flag resets this state before each job:

```php
use Illuminate\Queue\Worker;

// AppServiceProvider::boot()
Worker::$flushStickyConnections = true;

```

It is disabled by default because some workflows intentionally rely on reading data written by an earlier job in the same worker process.

---

Mercure Broadcasts Are Now Synchronous by Default
-------------------------------------------------

The Mercure broadcaster now publishes events immediately instead of queuing them. Events targeting only Mercure connections behave like `ShouldBroadcastNow`. Events that also target another connection are still queued. To restore the previous async behaviour, set `MERCURE_ASYNC=true` and provide a `MERCURE_URL`:

```ini
MERCURE_URL="${APP_URL}/.well-known/mercure"
MERCURE_ASYNC=true

```

The same PR fixes Artisan commands crashing with `BROADCAST_CONNECTION=mercure` when no `url` is configured and the FrankenPHP `mercure_publish()` function is unavailable.

---

DeleteWhenMissingModels and FailOnTimeout on Queued Mailables
-------------------------------------------------------------

Queued mailables now correctly honour the `#[DeleteWhenMissingModels]` and `#[FailOnTimeout]` attributes. If the model is deleted before the mail is sent, the job is silently discarded instead of throwing a `ModelNotFoundException`. With `#[FailOnTimeout]`, a timed-out mail job is marked as failed rather than retried — preventing duplicate sends.

---

Escaping Fix in Markdown Mail
-----------------------------

A security-adjacent fix ensures that backslashes in user-supplied values placed inside Markdown link text are now escaped alongside brackets, preventing a crafted value from altering the link target.

---

Key Takeaways
-------------

- **Fluent `Rule::` builders** now cover every validation rule, improving IDE autocomplete and eliminating comma-splitting bugs.
- **`DB::olap()`** makes large analytical queries on PlanetScale/Vitess straightforward.
- **`Worker::$flushStickyConnections`** prevents sticky-connection bleed-over between queue jobs.
- **Mercure broadcasts** are synchronous by default; opt into async with `MERCURE_ASYNC=true`.
- **`#[DeleteWhenMissingModels]` and `#[FailOnTimeout]`** now work correctly on queued mailables.
- A **Markdown mail escaping fix** closes a potential link-injection vector.

---

*Source: [Laravel News — Laravel 13.36.0](https://laravel-news.com/laravel-13-36-0)*

- [Laravel](https://msaied.com/articles?search=Laravel)
- [Validation](https://msaied.com/articles?search=Validation)
- [Queue](https://msaied.com/articles?search=Queue)
- [Database](https://msaied.com/articles?search=Database)
- [Mercure](https://msaied.com/articles?search=Mercure)
- [Release](https://msaied.com/articles?search=Release)

 Frequently asked questions 
---------------------------

  What does the new Rule:: builder change about comma-separated validation values?Previously, passing a string rule with a comma in a value could cause the validator to split it into two separate rules. The new Rule:: builder methods that accept field names or values return an object that passes parameters as an array, so commas in values are handled correctly.

   Is Worker::$flushStickyConnections enabled by default in Laravel 13.36?No. It is opt-in. Set Worker::$flushStickyConnections = true in your AppServiceProvider to reset sticky database connections between queue jobs. It is off by default because some jobs intentionally depend on reading data written by an earlier job in the same worker.

   How do I keep Mercure broadcasts asynchronous after upgrading to Laravel 13.36?Set MERCURE\_ASYNC=true in your .env file and provide a MERCURE\_URL pointing to your Mercure hub. Without a URL, queue workers cannot publish events over HTTP, so the URL is required when async mode is enabled.

   ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)About the author
----------------

[Mohamed Said](https://msaied.com#person)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

[About](https://msaied.com#about) [GitHub ↗](https://github.com/EG-Mohamed) [LinkedIn ↗](https://www.linkedin.com/in/msaiedm/) [WhatsApp ↗](https://wa.me/201094619204) [Email Address ↗](mailto:hello@msaied.com) [My CV ↗](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)  

   [Previous articleFilament v5.10.2 Released: Accessibility Fixes, RTL Support, and New Features](https://msaied.com/articles/filament-v5102-released-accessibility-fixes-rtl-support-and-new-features)  

   On this page
-------------

1. [What's New in Laravel 13.36](#whats-new-in-laravel-1336)
2. [Rule Builders for Every Remaining Validation Rule](#rule-builders-for-every-remaining-validation-rule)
3. [DB::olap() for PlanetScale and Vitess](#dbolap-for-planetscale-and-vitess)
4. [Reset Sticky Connections Between Queue Jobs](#reset-sticky-connections-between-queue-jobs)
5. [Mercure Broadcasts Are Now Synchronous by Default](#mercure-broadcasts-are-now-synchronous-by-default)
6. [DeleteWhenMissingModels and FailOnTimeout on Queued Mailables](#deletewhenmissingmodels-and-failontimeout-on-queued-mailables)
7. [Escaping Fix in Markdown Mail](#escaping-fix-in-markdown-mail)
8. [Key Takeaways](#key-takeaways)

 ###  Have a technical challenge?

 Tell me what you’re building. I reply within two working days.

[Start a conversation](https://msaied.com#contact) 

   Related articles
-----------------

 [ ![](https://cdn.msaied.com/776/8e8ee70ebeedf358233b53e19ecae4a1.png) Laravel · 4 min read### Filament v5.10.2 Released: Accessibility Fixes, RTL Support, and New Features

13 Oct 2026 ](https://msaied.com/articles/filament-v5102-released-accessibility-fixes-rtl-support-and-new-features) [ ![](https://cdn.msaied.com/780/484d115f641fe90ef3f2022aaff09526.png) Laravel · 4 min read### Filament v4.15.2 Released: Accessibility Overhaul, Bug Fixes &amp; New Features

13 Oct 2026 ](https://msaied.com/articles/filament-v4152-released-accessibility-overhaul-bug-fixes-new-features) [ ![](https://cdn.msaied.com/778/355fcfd808098ad188eb19a07db61e9a.png) Laravel · 4 min read### Filament v4.15.2 Released: Accessibility Overhaul, Bug Fixes, and New Features

13 Oct 2026 ](https://msaied.com/articles/filament-v4152-released-accessibility-overhaul-bug-fixes-and-new-features) 

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://msaied.com#contact) 

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://msaied.com)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://msaied.com/sitemap.xml)
