$child['content']['title'], 'value' => $child['content']['stepname'], 'index' => $child['content']['stepindex'] ]; }, $this->children()->toArray()); usort($steps, function ($a, $b) { return $a['index'] <=> $b['index']; }); return $steps; } }