Alphabetical order in listData ()

0
   <?php echo $form->dropDownListGroup($model, 'cur_id',
            array(
                'wrapperHtmlOptions' => array(
                    //'class' => 'col-sm-5',
                ),
                'widgetOptions' => array(
                    'data' => CHtml::listData(Curso::model()->findAll(),'cur_id','cur_curso'),
                    'htmlOptions' => array(
                        'empty'    => '...:: Selecione um Curso ::...',

                    ),
                )
            )
        ); ?>

How do I list the courses alphabetically in the combo? I tested asort () without success

    
asked by anonymous 14.02.2018 / 18:46

0 answers