Laravel 9.45 Released | Laravel News

The Laravel team released 9.45 this week with custom component search paths, a new validation rule, router convenience for ULID route params, and more:

Custom component search paths

Taylor Otwell contributed the registration of root-level anonymous component search paths. This is convenient for projects that have components in various locations.

To configure a search path, add the following to the boot() method within a registered service provider:



3// I.e., `<x-panel />`


5// With a prefixed namespace


7 __DIR__.'/../components',

8 'dashboard'



11// I.e., `<x-dashboard::panel />`

See theAnonymous Component Paths documentation for further details.

Decimal validation rule

@Pusparaj contributed a decimal validation rule with a min, max configuration. Here are a few examples from the pull request tests:

1// Passes validation

2$v = new Validator($trans, ['foo' => '1.234'], ['foo' => 'Decimal:2,3']);



5// Fails validation

6$v = new Validator($trans, ['foo' => '1.2345'], ['foo' => 'Decimal:2,3']);


Here’s how the rule works:

  1. decimal:2 is exactly two digits on the fractional part
  2. decimal:2,3 either two or three digits on the fractional part
  3. decimal:0,3 values must have at most three digits in the fractional part and can include zero digits (i.e., integer)

“whereUlid()” Route Support

Jamshed Javed contributed whereUlid() route support to the collection of commonly-used regular expressions. Given you want a route id param to match a ULID, you’d use the following now:

1Route::get('/user/{id}', function ($id) {

2 //


Release Notes

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



  • Allows the registration of custom, root-level anonymous component search paths. (#45338, 1ff0379)
  • Added decimal validation rule (#45356, e89b2b0)
  • Added align property to button mail component (#45362)
  • Added whereUlid(param) support for routing (#45372)


  • Fixed single line @php statements to not be parsed as php blocks in BladeCompiler (#45333)
  • Added missing code to set locale from model preferred locale in Maillable (#45308)


  • Vite: ability to prevent preload tag generation from attribute resolver callback (#45283)
  • Deprecation Test Improvements (#45317)
  • Do not allow nested arrays in whereIn method (140c3a8)
  • Bump ramsey/uuid (#45367)

Source link


Leave a Reply

Your email address will not be published. Required fields are marked *