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

        return $model::transformer();
    }