I'm trying to build a select input for a form with multiple layers of group options but I keep getting a "htmlentities() expects parameter 1 to be string, array given" error message.
I have tried different ways to make this work and have looked up documentation, finding plenty of stuff for one option group but nothing for multiple option groups. If anyone could point out where I'm going wrong or just tell me if this is just not allowed in Laravel it would be greatly appreciated! Thanks!
View:
{{ Form::select('example',
array(
'' => "example",
'First group' => array(
"Part A" => array(
'1' => "a",
'2' => "b",
),
"Part B" => array(
'1' => "a",
'2' => "b",
),
),
'Second Group' => array(
"Part A" => array(
'1' => "a",
'2' => "b",
),
"Part B" => array(
'1' => "a",
'2' => "b",
),
),
)) }}