Laravel 13: Features, Helpers &amp; Upgrade Notes | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://www.msaied.com/public) - [Home](https://www.msaied.com/public)
- [Projects](https://www.msaied.com/public/projects)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [About](https://www.msaied.com/public#about)

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

Menu
----

Close 

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

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

 1. [Home](https://www.msaied.com/public)
2. /
3. [Articles](https://www.msaied.com/public/articles)
4. /
5. Laravel New in 13: Features, Helpers, and Upgrade Notes

 Laravel New in 13: Features, Helpers, and Upgrade Notes
========================================================

 Laravel 13 ships with async-first primitives, tightened type contracts, and quality-of-life helpers that reward teams already on PHP 8.3+. Here is what matters and how to upgrade cleanly.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://www.msaied.com/public#person) Published 3 Sep 2026 · Updated 3 Sep 2026 · 3 min read

ShareCopy linkCopied

 ![Laravel New in 13: Features, Helpers, and Upgrade Notes](https://cdn.msaied.com/625/629cfac34ade7206a215809c0438c5ae.png) 

  On this page +1. [Laravel 13: What Actually Matters for Senior Engineers](#laravel-13-what-actually-matters-for-senior-engineers)
2. [PHP 8.3 as the Minimum Baseline](#php-83-as-the-minimum-baseline)
3. [Fluent Uri Value Object](#fluent-codeuricode-value-object)
4. [Request::string() and Tighter Input Casting](#coderequeststringcode-and-tighter-input-casting)
5. [Arr::from() and Collection Interop](#codearrfromcode-and-collection-interop)
6. [Breaking Changes Worth Auditing](#breaking-changes-worth-auditing)
7. [Upgrade Path](#upgrade-path)
8. [Takeaways](#takeaways)

 Laravel 13: What Actually Matters for Senior Engineers
------------------------------------------------------

Laravel 13 continues the framework's trend of shipping opinionated defaults while keeping the escape hatches open. This post focuses on the changes that affect production codebases — not the marketing highlights.

### PHP 8.3 as the Minimum Baseline

Laravel 13 drops PHP 8.1 and 8.2 support entirely. That is the first gate. If your hosting stack is behind, upgrade PHP before touching the framework.

The payoff is real: typed class constants, `json_validate()`, `readonly` class improvements, and the `#[\Override]` attribute are all first-class citizens now. The framework itself uses typed constants on several core classes, so your IDE and static analysis tools get sharper inference out of the box.

```php
// Framework internals now look like this — your own code can too
class Status
{
    const string ACTIVE = 'active';
    const string SUSPENDED = 'suspended';
}

```

### Fluent `Uri` Value Object

Laravel 13 ships a `Uri` value object that wraps League URI under the hood but exposes a fluent, immutable API directly from the `Illuminate\Support` namespace.

```php
use Illuminate\Support\Uri;

$uri = Uri::of('https://example.com/api/v1')
    ->withPath('/api/v2/users')
    ->withQueryParam('page', 3)
    ->withQueryParam('per_page', 25);

echo $uri; // https://example.com/api/v2/users?page=3&per_page=25

```

This replaces the scattered `parse_url` / `http_build_query` gymnastics that litter most codebases. It is immutable, so you can safely pass it through pipelines without defensive cloning.

### `Request::string()` and Tighter Input Casting

The `Request` object gains `string()`, `integer()`, `float()`, and `boolean()` methods that return typed scalars rather than raw strings. This closes a long-standing gap where `$request->input('limit')` returned a string even when you expected an int.

```php
// Before
$limit = (int) $request->input('limit', 20);

// Laravel 13
$limit = $request->integer('limit', 20); // already existed
$search = $request->string('q')->trim()->lower()->value();

```

The `string()` method returns a `Stringable` instance, so you can chain fluent string operations before extracting the value.

### `Arr::from()` and Collection Interop

`Arr::from()` is a small but welcome addition that normalises any iterable — including generators, `Traversable` objects, and `Collection` instances — into a plain PHP array without the `iterator_to_array` boilerplate.

```php
use Illuminate\Support\Arr;

$array = Arr::from($lazyCollection->take(500));

```

### Breaking Changes Worth Auditing

**1. `Model::preventLazyLoading()` is on by default in `APP_ENV=local`.**If you were relying on lazy loading in tests or local tooling, you will see `LazyLoadingViolationException` immediately. Fix your eager loads rather than disabling the guard.

**2. `Storage::url()` now throws on missing disks.**Previously it silently returned a broken URL. Wrap calls in a try/catch or guard with `Storage::disk($disk)->exists()` first.

**3. Queue serialization of closures requires `laravel/serializable-closure` ^2.0.**Bump the constraint in `composer.json` before upgrading.

### Upgrade Path

```bash
# 1. Bump PHP to 8.3 in your Dockerfile / runtime
# 2. Update composer.json
composer require laravel/framework:^13.0 --update-with-dependencies

# 3. Run the automated upgrade checks
php artisan about
php artisan config:clear && php artisan cache:clear

# 4. Run your full test suite with strict mode on
php artisan test --parallel

```

Check `CHANGELOG.md` in the framework repo for the exhaustive list; the above covers the changes most likely to bite a real production app.

### Takeaways

- PHP 8.3 is now mandatory — audit your hosting stack first.
- The `Uri` value object eliminates a whole class of URL-manipulation bugs.
- `Request::string()` and friends return typed values, tightening input contracts.
- `Arr::from()` normalises any iterable cleanly.
- Lazy loading violations are surfaced by default locally — treat them as bugs, not noise.
- Queue closure serialization requires `serializable-closure` ^2.0.

- [laravel](https://www.msaied.com/public/articles?search=laravel)
- [php](https://www.msaied.com/public/articles?search=php)
- [upgrade](https://www.msaied.com/public/articles?search=upgrade)
- [backend](https://www.msaied.com/public/articles?search=backend)

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

  Can I upgrade to Laravel 13 without upgrading to PHP 8.3?No. Laravel 13 requires PHP 8.3 as its minimum version. You must upgrade your runtime before bumping the framework constraint in composer.json.

   Does the new Uri value object replace the existing URL helper?It complements rather than replaces it. The `url()` helper and `URL` facade remain for route-aware URL generation. `Uri::of()` is for constructing and manipulating arbitrary URIs in a type-safe, immutable way.

   Will enabling lazy loading violations by default break my test suite?Only if your tests rely on implicit lazy loading. The fix is to add the missing `with()` eager loads to your queries. You can temporarily disable the guard in a specific test with `Model::withoutLazyLoadingViolations()` while you work through the backlog.

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

[Mohamed Said](https://www.msaied.com/public#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://www.msaied.com/public#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 articleGroup Adjacent Collection Items in Laravel with chunkBy()](https://www.msaied.com/public/articles/group-adjacent-collection-items-in-laravel-with-chunkby) [Next articleSemantic Memory or Just Markdown? How Laravel Boost Manages AI Agent Project Rules](https://www.msaied.com/public/articles/semantic-memory-or-just-markdown-how-laravel-boost-manages-ai-agent-project-rules)  

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

1. [Laravel 13: What Actually Matters for Senior Engineers](#laravel-13-what-actually-matters-for-senior-engineers)
2. [PHP 8.3 as the Minimum Baseline](#php-83-as-the-minimum-baseline)
3. [Fluent Uri Value Object](#fluent-codeuricode-value-object)
4. [Request::string() and Tighter Input Casting](#coderequeststringcode-and-tighter-input-casting)
5. [Arr::from() and Collection Interop](#codearrfromcode-and-collection-interop)
6. [Breaking Changes Worth Auditing](#breaking-changes-worth-auditing)
7. [Upgrade Path](#upgrade-path)
8. [Takeaways](#takeaways)

 ###  Have a technical challenge?

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

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

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

 [ ![](https://cdn.msaied.com/740/cce86edc21eddcbdd2f2454fadaf9c70.png)  · 3 min read### The Pipeline Pattern in Laravel: Custom Pipelines Beyond Middleware

5 Oct 2026 ](https://www.msaied.com/public/articles/the-pipeline-pattern-in-laravel-custom-pipelines-beyond-middleware-1) [ ![](https://cdn.msaied.com/739/2d6897fdcdcf090613f96f72a64b8a78.png)  · 4 min read### MySQL Full-Text Search in Laravel: Indexes, Relevance Scoring, and Boolean Mode

4 Oct 2026 ](https://www.msaied.com/public/articles/mysql-full-text-search-in-laravel-indexes-relevance-scoring-and-boolean-mode) [ ![](https://cdn.msaied.com/738/073696a3fefe18bec825beec5ac658f5.png)  · 4 min read### Laravel Queue Rate-Limited Middleware: Throttling Jobs Without Losing Work

4 Oct 2026 ](https://www.msaied.com/public/articles/laravel-queue-rate-limited-middleware-throttling-jobs-without-losing-work) 

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

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

 [Discuss your project ↗](https://www.msaied.com/public#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://www.msaied.com/public)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/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://www.msaied.com/public/sitemap.xml)
