public function formatSelectOptions(Field $field, EloquentCollection $results)
    {
        $return = array();

        foreach ($results as $m) {
            $return[] = array(
                'id'   => $m->getKey(),
                'text' => strval($m->{$field->getOption('name_field')}),
            );
        }

        return $return;
    }
public function formatSelectOptions(Field $field, EloquentCollection $results)
    {
        $return = array();

        foreach ($results as $m) {
            $return[] = array(
                'id'   => $m->getKey(),
                'text' => strval($m->{$field->getOption('name_field')}),
            );
        }

        return $return;
    }
public function formatSelectOptions ( Field $ field , EloquentCollection $ results ) { $ return = array ( ) ; foreach ( $ results as $ m ) { $ return [ ] = array ( 'id' => $ m -> getKey ( ) , 'text' => strval ( $ m -> { $ field -> getOption ( 'name_field' ) } ) , ) ; } return $ return ; }
Takes an eloquent result array and turns it into an options array that can be used in the UI.

@param \Frozennode\Administrator\Fields\Field   $field
@param \Illuminate\Database\Eloquent\Collection $results

@return array
Takes an eloquent result array and turns it into an options array that can be used in the UI .