public function postUpdateComponentGroupOrder()
    {
        $groupData = Binput::get('ids');

        foreach ($groupData as $order => $groupId) {
            $group = ComponentGroup::find($groupId);

            execute(new UpdateComponentGroupCommand(
                $group,
                $group->name,
                $order + 1,
                $group->collapsed,
                $group->visible
            ));
        }

        return $this->collection(ComponentGroup::query()->orderBy('order')->get());
    }
public function postUpdateComponentGroupOrder()
    {
        $groupData = Binput::get('ids');

        foreach ($groupData as $order => $groupId) {
            $group = ComponentGroup::find($groupId);

            execute(new UpdateComponentGroupCommand(
                $group,
                $group->name,
                $order + 1,
                $group->collapsed,
                $group->visible
            ));
        }

        return $this->collection(ComponentGroup::query()->orderBy('order')->get());
    }
public function postUpdateComponentGroupOrder ( ) { $ groupData = Binput :: get ( 'ids' ) ; foreach ( $ groupData as $ order => $ groupId ) { $ group = ComponentGroup :: find ( $ groupId ) ; execute ( new UpdateComponentGroupCommand ( $ group , $ group -> name , $ order + 1 , $ group -> collapsed , $ group -> visible ) ) ; } return $ this -> collection ( ComponentGroup :: query ( ) -> orderBy ( 'order' ) -> get ( ) ) ; }
Updates the order of component groups.

@return array
Updates the order of component groups .