Support the ongoing development of Laravel.io →
posted 3 years ago

I am bugged. This is bugging me. But it's not a bug. It is a poor design in my eyes. Let me explain:

In a FormRequest you have a has method. Say you have a $_GET['page']['size'] = 5; The has method easily figures out that 'page.size' does exist, using Arr::has.

get however, will not ever get you to this path. instead you have to do ->get('page')['size']. ugly!

The has method on the inputbags ( "FormRequest->query->has()" ) does not work like the has on the FormRequest.

If it were me, I'd supported the dotted path on all these methods, as Arr::get already does. Is this a bug report, or is this a Feature request? Because I find myself creating an abstract CustomFormRequest or a macro so that I can support these everywhere in every new project I am building. I can ofcourse create a package, but this is basically correcting a framework issue instead of adding functionality.

Last updated by @henzeb 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Henze Berkheij henzeb Joined 22 Feb 2022

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.