protected function resolveTransformerFromModel(Model $model)
    {
        if (! $model instanceof Transformable) {
            return function ($model) {
                return $model->toArray();
            };
        }

        return $model::transformer();
    }
protected function resolveTransformerFromModel(Model $model)
    {
        if (! $model instanceof Transformable) {
            return function ($model) {
                return $model->toArray();
            };
        }

        return $model::transformer();
    }
protected function resolveTransformerFromModel ( Model $ model ) { if ( ! $ model instanceof Transformable ) { return function ( $ model ) { return $ model -> toArray ( ) ; } ; } return $ model :: transformer ( ) ; }
Resolve a transformer from the model. If the model is not transformable, a closure
based transformer will be created instead, from the model's fillable attributes.

@param  \Illuminate\Database\ELoquent\Model $model
@return \Flugg\Responder\Transformer|callable
Resolve a transformer from the model . If the model is not transformable a closure based transformer will be created instead from the model s fillable attributes .