protected function numbersFromAjax($ajaxNumbers)
    {
        $numbers = [];
        $numberRegex = '/\d/';

        if (!empty($ajaxNumbers)) {
            if (!is_array($ajaxNumbers) && preg_match($numberRegex, $ajaxNumbers)) {
                $numbers = [$ajaxNumbers];
            } else {
                foreach ($ajaxNumbers as $i => $number) {
                    if (preg_match($numberRegex, $number)) {
                        $numbers[] = $number;
                    } else {
                        $numbers = [];
                        break;
                    }
                }
            }
        }

        return $numbers;
    }
protected function numbersFromAjax($ajaxNumbers)
    {
        $numbers = [];
        $numberRegex = '/\d/';

        if (!empty($ajaxNumbers)) {
            if (!is_array($ajaxNumbers) && preg_match($numberRegex, $ajaxNumbers)) {
                $numbers = [$ajaxNumbers];
            } else {
                foreach ($ajaxNumbers as $i => $number) {
                    if (preg_match($numberRegex, $number)) {
                        $numbers[] = $number;
                    } else {
                        $numbers = [];
                        break;
                    }
                }
            }
        }

        return $numbers;
    }
protected function numbersFromAjax ( $ ajaxNumbers ) { $ numbers = [ ] ; $ numberRegex = '/\d/' ; if ( ! empty ( $ ajaxNumbers ) ) { if ( ! is_array ( $ ajaxNumbers ) && preg_match ( $ numberRegex , $ ajaxNumbers ) ) { $ numbers = [ $ ajaxNumbers ] ; } else { foreach ( $ ajaxNumbers as $ i => $ number ) { if ( preg_match ( $ numberRegex , $ number ) ) { $ numbers [ ] = $ number ; } else { $ numbers = [ ] ; break ; } } } } return $ numbers ; }
Convert an array from the posted numbers

@param  array $dates

@return array
Convert an array from the posted numbers