src/Utils/ApiResources.php
public static function getTransformerFromResource($resource)
    {
        if (! in_array($resource, static::getResources())) {
            return '';
        }

        $resourceName = studly_case(str_singular($resource));

        return 'App\Transformers\\'.$resourceName.'s\\'.$resourceName.'Transformer';   
    }
public static function getTransformerFromResource($resource)
    {
        if (! in_array($resource, static::getResources())) {
            return '';
        }

        $resourceName = studly_case(str_singular($resource));

        return 'App\Transformers\\'.$resourceName.'s\\'.$resourceName.'Transformer';   
    }
public static function getTransformerFromResource ( $ resource ) { if ( ! in_array ( $ resource , static :: getResources ( ) ) ) { return '' ; } $ resourceName = studly_case ( str_singular ( $ resource ) ) ; return 'App\Transformers\\' . $ resourceName . 's\\' . $ resourceName . 'Transformer' ; }
Returns transformer class from a REST resource identifier

@param String $resource
@return String
Returns transformer class from a REST resource identifier