mercredi 28 septembre 2016

Laravel 5.3 does not get array input fields

I have a form with these fields in it:

<input type="hidden" name="board_members[]" value="2">
<input type="hidden" name="board_members[]" value="1">

In the controller store method I do this:

dd($request->input('board_members.*'));

I get null.

I tried:

dd($request->input('board_members.*.name'));

I get null.

I also tried:

$request->board_members

Then I get "0".

How can I get these values in the controller?

Thank you



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire