I've found a few examples of using optgroup, but they all seem to be missing what i'm looking for In the db, table with some parent_ids (in same table). id name parent_id 1 Test 0 2 Test2 0 3 WithChild 0 9 Child 3
I am already php hacking to build my array that basically looks like this
[0] => Array
[id] => 1
[name] => Test
)
[1] => Array
(
[id] => 2
[name] => Test2
)
[2] => Array
(
[id] => 3
[name] => WithChild
[_children] => Array
(
[0] => Array
(
[id] => 9
[name] => Child
And i am having problems with creating the following.
<select>
<option value="1">Test</option>
<option value="2">Test2</option>
<optgroup label="With Child">
<option value="9">Child</option>
etc
I can(and am at the moment), hack it with normal php. But cannot work out the laravel way to do it
Any suggestions please ?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community