protected function resolveTransformer(Model $model, $transformer = null)
    {
        $transformer = $transformer ?: $this->resolveTransformerFromModel($model);

        if (is_string($transformer)) {
            $transformer = new $transformer;
        }

        return $this->parseTransformer($transformer, $model);
    }
protected function resolveTransformer(Model $model, $transformer = null)
    {
        $transformer = $transformer ?: $this->resolveTransformerFromModel($model);

        if (is_string($transformer)) {
            $transformer = new $transformer;
        }

        return $this->parseTransformer($transformer, $model);
    }
protected function resolveTransformer ( Model $ model , $ transformer = null ) { $ transformer = $ transformer ? : $ this -> resolveTransformerFromModel ( $ model ) ; if ( is_string ( $ transformer ) ) { $ transformer = new $ transformer ; } return $ this -> parseTransformer ( $ transformer , $ model ) ; }
Resolve a transformer.

@param  \Illuminate\Database\ELoquent\Model        $model
@param  \Flugg\Responder\Transformer|callable|null $transformer
@return \Flugg\Responder\Transformer|callable
Resolve a transformer .