Code review at scale is broken. Here’s how Augment Code is fixing it.

Laravel 9.37 Released

Published on by

Laravel 9.37 Released image

Never Miss a Laravel Release πŸš€

Sign up and get an email with each new Laravel release

The Laravel team released 9.37 this week along with a few patch releases between 9.37 and the release of Laravel 9.36. This week's releases added support for preloading assets with Vite, new strict violation handlers, verbose view caching CLI output, and more.

Verbose view caching

Andrew Brown contributed the ability to pass -v to the view:cache artisan command to output the directories the command is looking in and -vv to see every file the command caches.

php artisan view:cache -vv

Here's an example of what you'll see with a fresh install of Laravel 9.37:

Handlers for silently discarded and missing attributes

Aaron Francis contributed the ability to register handlers for "silently discarded" and "missing attributes" strict mode violations:

Model::handleMissingAttributeViolationUsing(
function ($model, $key) {
// ...
}
);
 
Model::handleDiscardedAttributeViolationUsing(
function ($model, $keys) {
// ...
}
);

Pass a closure for the rescue report param

@foremtehan contributed passing a callable as the $report parameter when using rescue() so you can conditionally report the error based on the boolean returned:

rescue(fn() => 'error', fn() => 'rescue', function(Throwable $e){
return $e instanceof SomeException;
});

Support preloading assets with Vite

Tim MacDonald contributed preloading of assets required for the current page load with Vite. It is now the default behavior for Laravel applications using Vite. The details of how this works is quite intricate, and I'd recommend reading the description of Pull Request #44096. Also, you can learn more about the general concepts behind preloading critical assets to improve loading speed.

Query builder raw value method

@eusonlito contributed a rawValue() method to get a value from a SQL expression. Here are some examples from the pull request:

$first = TripModel::orderBy('date_at', 'ASC')
->rawValue('YEAR(`date_at`)');
$last = TripModel::orderBy('date_at', 'DESC')
->rawValue('YEAR(`date_at`)');
 
$fullname = UserModel::where('id', $id)
->rawValue('CONCAT(`first_name`, " ", `last_name`)');

Release Notes

You can see the complete list of new features and updates below and the diff between 9.36.0 and 9.37.0 on GitHub. The following release notes are directly from the changelog:

v9.37.0

Added

  • Added optional verbose output when view caching (#44673)
  • Allow passing closure to rescue $report parameter (#44710)
  • Support preloading assets with Vite (#44096)
  • Added Illuminate/Mail/Mailables/Content::htmlString() (#44703)

Fixed

  • Fixed model:show registering getAttribute() as a null accessor (#44683)
  • Fix expectations for output assertions in PendingCommand (#44723)

v9.36.4

Added

  • Added rawValue to Database Query Builder (and Eloquent as wrapper) (#44631)
  • Added TransactionCommitting (#44608)
  • Added dontIncludeSource to CliDumper and HtmlDumper (#44623)
  • Added Illuminate/Filesystem/FilesystemAdapter::checksum() (#44660)
  • Added handlers for silently discarded and missing attribute violations (#44664)

Reverted

Changed

  • Create new Json ParameterBag Instance when cloning Request (#44671)
  • Prevents booting providers when running env:decrypt (#44654)

v9.36.3

Reverted

  • Reverts micro-optimization on view events (#44653)

Fixed

  • Fixes blade not forgetting compiled views on view:clear (#44643)
  • Fixed Illuminate/Database/Eloquent/Model::offsetExists() (#44642)
  • Forget component's cache and factory between tests (#44648)

Changed

  • Bump Testbench dependencies (#44651)

v9.36.2

Fixed

  • Ensures view creators and composers are called when * is present (#44636)

v9.36.1

Fixed

  • Fixes livewire components that were using createBladeViewFromString (#pull)
Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Acquaint Softtech

Hire Laravel developers with AI expertise at $20/hr. Get started in 48 hours.

Visit Acquaint Softtech
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $3200/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit

The latest

View all →
Improved Skill and Guideline Detection in Laravel Boost v2.2.0 image

Improved Skill and Guideline Detection in Laravel Boost v2.2.0

Read article
"The Vibes" β€” NativePHP Hosts a Day 3 after Laracon US image

"The Vibes" β€” NativePHP Hosts a Day 3 after Laracon US

Read article
What We Know About Laravel 13 image

What We Know About Laravel 13

Read article
New Colors Added in Tailwind CSS v4.2 image

New Colors Added in Tailwind CSS v4.2

Read article
Factory makeMany() Method in Laravel 12.52.0 image

Factory makeMany() Method in Laravel 12.52.0

Read article
Laravel Adds an Official Svelte + Inertia Starter Kit image

Laravel Adds an Official Svelte + Inertia Starter Kit

Read article