|
@@ -46,11 +46,11 @@ class TransformerTagsStrategy
|
|
|
$modelInstance = $this->instantiateTransformerModel($model);
|
|
|
|
|
|
$fractal = new Manager();
|
|
|
-
|
|
|
- if(!is_null(config('apidoc.fractal.serializer'))) {
|
|
|
+
|
|
|
+ if (!is_null(config('apidoc.fractal.serializer'))) {
|
|
|
$fractal->setSerializer(app(config('apidoc.fractal.serializer')));
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$resource = (strtolower($transformerTag->getName()) == 'transformercollection')
|
|
|
? new Collection([$modelInstance, $modelInstance], new $transformer)
|
|
|
: new Item($modelInstance, new $transformer);
|