Never Miss a Laravel Release 🚀
The Laravel team released version 12.41, featuring an updated modern email template, new duration helpers for milliseconds, weeks, and months, a reload command for services during deployment, and more.
Modernize Email Template
Taylor Otwell updated Laravel's default email template to a more modern version:

See Pull Request #57987 for implementation details.
Duration Helpers for Milliseconds, Weeks, and Months
Sander Muller contributed duration helpers for milliseconds(), weeks(), and months(), building onto the introduction of duration helpers in Laravel 12.40:
use function Illuminate\Support\{seconds, minutes, hours, days, years, milliseconds, weeks, months}; milliseconds(10);weeks(4);months(72); // returns Carbon\CarbonInterval // Existing duration helpers released in Laravel 12.40seconds(5);minutes(5);hours(1);days(30);years(1);
Add throwUnless Method to HTTP Client Response
Cas Ebbers contributed a throwUnless() method to the HTTP client Response class:
use Illuminate\Http\Client\Response; // Throw an exception if an error occurred and the given condition is false...$response->throwUnless($condition); // Throw an exception if an error occurred and the given closure resolves to false...$response->throwUnless(fn (Response $response) => false);
The throwUnless() method was previously documented; however, it was only implemented in PendingRequest. See Pull Request #57951 for details.
Add Reload Command and Allow Services to Register
Barry vd. Heuvel contributed a reload Artisan command and the ability for service providers to add their own commands. It allows services to have a single command to add their deployment steps after a deployment is completed:
public function boot(){ $this->reloads('reverb:restart');}
See Pull Request #57923 for details.
Release notes
You can see the complete list of new features and updates below and the diff between 12.40.0 and 12.41.0 on GitHub. The following release notes are directly from the changelog:
v12.41.0
- [12.x] Add
throwUnless()toIlluminate\Http\Client\Responseby @CasEbb in https://github.com/laravel/framework/pull/57951 - [12.x] Fix deprecation error in
HasAttributes::addDateAttributesToArray()whenUPDATED_AT = nulland model is cast to array by @crynobone in https://github.com/laravel/framework/pull/57945 - [12.x] Reduce indentation in
PendingRequest@send()with an early return by @cosmastech in https://github.com/laravel/framework/pull/57943 - [12.x] PendingRequest HTTP methods may also return promises by @cosmastech in https://github.com/laravel/framework/pull/57941
- [12.x] Fix unable to flush redis tagged cache when prefix contains
-instead of_by @crynobone in https://github.com/laravel/framework/pull/57927 - fix: hasMorph/whereDoesntHaveMorph OR grouping with nullable morphs by @hannrei in https://github.com/laravel/framework/pull/57937
- [12.x] Flush only active buffers while streaming response using a generator by @vaishnavyogesh in https://github.com/laravel/framework/pull/57952
- Fix substrReplace to be multibyte safe by @Nasim25 in https://github.com/laravel/framework/pull/57936
- [12.x] fixes static analysis error by @cosmastech in https://github.com/laravel/framework/pull/57953
- [12.x] Pass
LoggerInterfacewhen constructingRoundrobinTransportinstance by @jnoordsij in https://github.com/laravel/framework/pull/57956 - [12.x] Optimize cache and cache_locks timeout by @chrisnetonline in https://github.com/laravel/framework/pull/57966
- [12.x] Introduce
FluentPromiseto allow for cleaner chaining in Pool by @cosmastech in https://github.com/laravel/framework/pull/57967 - [12.x] Add Dependency in JsonSchema by @pushpak1300 in https://github.com/laravel/framework/pull/57942
- Introduce
lazyobject andproxyobject support helpers by @timacdonald in https://github.com/laravel/framework/pull/57831 - [12.x] Add reload command and allow services to register by @barryvdh in https://github.com/laravel/framework/pull/57923
- [12.x] Ensure pretending flag is always reset in
pretend()method by @xurshudyan in https://github.com/laravel/framework/pull/57968 - [12.x] Always restore missing-attribute flag in
offsetExists()by @xurshudyan in https://github.com/laravel/framework/pull/57970 - [12.x] Fix Arr::first for ArrayObject and AsArrayObject values by @prince-noman in https://github.com/laravel/framework/pull/57969
- [12.x] Use displayName() for custom job identification by @hxnk in https://github.com/laravel/framework/pull/57499
- [12.x] Expand Redis DurationLimiter tests by @miladev95 in https://github.com/laravel/framework/pull/57947
- [12.x] Fix grammar in event dispatcher comment by @shaedrich in https://github.com/laravel/framework/pull/57983
- Modernize email template by @taylorotwell in https://github.com/laravel/framework/pull/57987
- [12.x] Improve event types by @shaedrich in https://github.com/laravel/framework/pull/57986
- [12.x] Add ability to ignore queuePaused \ queueShouldRestart cache checks by @jackbayliss in https://github.com/laravel/framework/pull/57975
- [12.x] Fix cache:clear command exit code on failure by @alies-dev in https://github.com/laravel/framework/pull/57988
- Bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /src/Illuminate/Foundation/resources/exceptions/renderer by @dependabot[bot] in https://github.com/laravel/framework/pull/57994
- [12.x] Add
milliseconds,weeks, andmonthsduration helpers toIlluminate\Supportby @SanderMuller in https://github.com/laravel/framework/pull/57997 - [12.x] Add wildcard pattern support to TrimStrings middleware by @overtrue in https://github.com/laravel/framework/pull/57982