protected function validateSortableParameters($key, $direction)
    {
        if (is_null($key))
        {
            // We are using the facade here instead of the request helper
            // to make this package compatible with Laravel 5.0
            $key = \Request::input(Supporter::keyName);
        }

        if (is_null($direction))
        {
            $direction = \Request::input(Supporter::directionName);
        }

        $direction = $this->getSortableDirection($direction);
        $key = $this->getSortableKey($key);

        $this->setSupporterParams($key, $direction);

        return array($key, $direction);
    }
protected function validateSortableParameters($key, $direction)
    {
        if (is_null($key))
        {
            // We are using the facade here instead of the request helper
            // to make this package compatible with Laravel 5.0
            $key = \Request::input(Supporter::keyName);
        }

        if (is_null($direction))
        {
            $direction = \Request::input(Supporter::directionName);
        }

        $direction = $this->getSortableDirection($direction);
        $key = $this->getSortableKey($key);

        $this->setSupporterParams($key, $direction);

        return array($key, $direction);
    }
protected function validateSortableParameters ( $ key , $ direction ) { if ( is_null ( $ key ) ) { // We are using the facade here instead of the request helper // to make this package compatible with Laravel 5.0 $ key = \ Request :: input ( Supporter :: keyName ) ; } if ( is_null ( $ direction ) ) { $ direction = \ Request :: input ( Supporter :: directionName ) ; } $ direction = $ this -> getSortableDirection ( $ direction ) ; $ key = $ this -> getSortableKey ( $ key ) ; $ this -> setSupporterParams ( $ key , $ direction ) ; return array ( $ key , $ direction ) ; }
Validates sortable parameters

@param $key
@param $direction
@return array
Validates sortable parameters