protected function getOptionsFromArray($scope, $searchQuery = null)
    {
        /*
         * Load the data
         */
        $options = $scope->options;

        if (is_scalar($options)) {
            $model = $this->scopeModels[$scope->scopeName];
            $methodName = $options;

            if (!$model->methodExists($methodName)) {
                throw new ApplicationException(Lang::get('backend::lang.filter.options_method_not_exists', [
                    'model'  => get_class($model),
                    'method' => $methodName,
                    'filter' => $scope->scopeName
                ]));
            }

            $options = $model->$methodName();
        }
        elseif (!is_array($options)) {
            $options = [];
        }

        /*
         * Apply the search
         */
        $searchQuery = Str::lower($searchQuery);
        if (strlen($searchQuery)) {
            $options = $this->filterOptionsBySearch($options, $searchQuery);
        }

        return $options;
    }
protected function getOptionsFromArray($scope, $searchQuery = null)
    {
        /*
         * Load the data
         */
        $options = $scope->options;

        if (is_scalar($options)) {
            $model = $this->scopeModels[$scope->scopeName];
            $methodName = $options;

            if (!$model->methodExists($methodName)) {
                throw new ApplicationException(Lang::get('backend::lang.filter.options_method_not_exists', [
                    'model'  => get_class($model),
                    'method' => $methodName,
                    'filter' => $scope->scopeName
                ]));
            }

            $options = $model->$methodName();
        }
        elseif (!is_array($options)) {
            $options = [];
        }

        /*
         * Apply the search
         */
        $searchQuery = Str::lower($searchQuery);
        if (strlen($searchQuery)) {
            $options = $this->filterOptionsBySearch($options, $searchQuery);
        }

        return $options;
    }
protected function getOptionsFromArray ( $ scope , $ searchQuery = null ) { /*
         * Load the data
         */ $ options = $ scope -> options ; if ( is_scalar ( $ options ) ) { $ model = $ this -> scopeModels [ $ scope -> scopeName ] ; $ methodName = $ options ; if ( ! $ model -> methodExists ( $ methodName ) ) { throw new ApplicationException ( Lang :: get ( 'backend::lang.filter.options_method_not_exists' , [ 'model' => get_class ( $ model ) , 'method' => $ methodName , 'filter' => $ scope -> scopeName ] ) ) ; } $ options = $ model -> $ methodName ( ) ; } elseif ( ! is_array ( $ options ) ) { $ options = [ ] ; } /*
         * Apply the search
         */ $ searchQuery = Str :: lower ( $ searchQuery ) ; if ( strlen ( $ searchQuery ) ) { $ options = $ this -> filterOptionsBySearch ( $ options , $ searchQuery ) ; } return $ options ; }
Look at the defined set of options for scope items, or the model method.
@return array
Look at the defined set of options for scope items or the model method .