I'm using {!! Form::model( $data) !!} to get my edit working dynamically, also I have normal inputs like {!! Form::text('name', null) !!} but, within my controller, before I send my $data to my view, I use with like the following $data = User::with('Address')->find($id_user);
When I submit, I send my form to my controller update public function update(MyRequest $request) that merge both rules (address and user) to create the validation.
The problem:
The Address input to work with Form::model, I had to make it as an array like this {!! Form::text('Address[zipcode]', null) !!} and now, my validation doesn't work.
My request looks like this:
Array ( [_method] => PATCH [_token] => OlF0IuFxwTIucFavzUB9Sk1IGE5NJlaaarbBxSE [name] => Michel [Address] => Array ( [zipcode] => 80000400))
I was thinking if there is a way to indicate via rule that it should be looked inside the sub-array, something like Address[zipcode] but it didn't work