I have an incoming post data from js like this
[form] => Array (
[name] => 'a form'
[type] => 'form'
...
[children] => Array (
[0] =>
[1] =>
[2] => Array(
[title] => 'first'
[order] => '1'
...
}
[3] => Array(
[title] => 'second'
[order] => '2'
...
)
...
)
...
)
and rules like
[
'form.name' => 'required|string',
'form.type' => 'required|string',
...
'form.children.*.title' => 'requered|string'
'form.children.*.order' => 'requered|integer'
...
]
What is the best way to completely exclude/skip the form.children arrays that are empty and process the ones with data?