Support the ongoing development of Laravel.io →
Requests Forms Architecture

Is it possible to bind lets say I have class SearchForm with attributes filter1, filter2. and on my controller I have action like public function myAction(SearchForm $form) { }

when I create form inputs with the same name as the attributes it will automatically instantiate the class SearchForm with the attributes populated by the form inputs?

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Daskul daskul Joined 22 Mar 2014

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.