protected function forEachElement(Collection $elements, $callback)
    {
        foreach ($this->flatNamedElements($elements) as $element) {
            $callback($element);
        }
    }
protected function forEachElement(Collection $elements, $callback)
    {
        foreach ($this->flatNamedElements($elements) as $element) {
            $callback($element);
        }
    }
protected function forEachElement ( Collection $ elements , $ callback ) { foreach ( $ this -> flatNamedElements ( $ elements ) as $ element ) { $ callback ( $ element ) ; } }
Applies given callback to every element of form.

@param \Illuminate\Support\Collection $elements
@param $callback
Applies given callback to every element of form .