New in Laravel 13.21: #[RequestAttribute]
The request attributes bag is perfect for data you've already resolved during the current request.
For example, if middleware has already loaded the current tenant, there's no reason to hit the database again later.
#[RequestAttribute] makes reusing that request-scoped data much cleaner
Punyapal Shah
@MrPunyapal
A Laravel-inspired web framework for Rust.
github.com/entrepeneur4lyf/suprnova
Most Laravel developers know unique().
But did you know Collections also have duplicates()?
One thing that surprised me is how it works.
If a value appears 3 times, it will be returned twice. Every occurrence after the first is considered a duplicate.
Most Laravel developers know pipe().
Far fewer know about pipeThrough().
Instead of one transformation, you can pass your collection through multiple reusable callables, keeping each step small, focused, and easy to test.
Have you ever used it?
New #[WithoutMiddleware] attribute already documented in the Laravel attribute list, check it out 👇
mrpunyapal.github.io/laravel-attributes-list/attributes/controllers/WithoutMiddleware