public function detectRules(AppliesToResource $resource, $relationDepth=1)
    {
        $type = $this->typeProvider->xType($resource);
        return $this->ruleConverter->toRule($type, $relationDepth);
    }
public function detectRules(AppliesToResource $resource, $relationDepth=1)
    {
        $type = $this->typeProvider->xType($resource);
        return $this->ruleConverter->toRule($type, $relationDepth);
    }
public function detectRules ( AppliesToResource $ resource , $ relationDepth = 1 ) { $ type = $ this -> typeProvider -> xType ( $ resource ) ; return $ this -> ruleConverter -> toRule ( $ type , $ relationDepth ) ; }
Convert a resource into a laravel rule array.

@param AppliesToResource $resource
@param int|array         $relationDepth (default:1)

@return array
Convert a resource into a laravel rule array .