public static function selectOptions(\Closure $closure = null, $rootText = 'Root')
    {
        $options = (new static())->withQuery($closure)->buildSelectOptions();

        return collect($options)->prepend($rootText, 0)->all();
    }
public static function selectOptions(\Closure $closure = null, $rootText = 'Root')
    {
        $options = (new static())->withQuery($closure)->buildSelectOptions();

        return collect($options)->prepend($rootText, 0)->all();
    }
public static function selectOptions ( \ Closure $ closure = null , $ rootText = 'Root' ) { $ options = ( new static ( ) ) -> withQuery ( $ closure ) -> buildSelectOptions ( ) ; return collect ( $ options ) -> prepend ( $ rootText , 0 ) -> all ( ) ; }
Get options for Select field in form.

@param \Closure|null $closure
@param string        $rootText

@return array
Get options for Select field in form .