Feature(s) impacted
Viewing a certain collection, returns “invalid data”.
Observed behavior
Returns a 500 error -
Argument 1 passed to ForestAdmin\LaravelForestAdmin\Transformers\ChildTransformer::transform() must be an instance of Illuminate\Database\Eloquent\Model, instance of Illuminate\Database\Eloquent\Collection given, called in \vendor\league\fractal\src\Scope.php on line 357.
Error originates in src/transformers/ChildTransformers.php:21 (transform method, handling smart arrays).
I assume there’s some issue with the specific Model we have and it’s relations, from what I can see it’s to do with potential morphs. I can send the forestadmin schema json and a copy of our Model php in question.
Expected behavior
Able to view collection in question without errors.
Failure Logs
I can send the trace logs privately.
Context
- Project name: Can send privately on request
- Team name: Can send privately on request
- Environment name: development
- Agent type & version: Laravel “forestadmin/laravel-forestadmin” @1.2
- Recent changes made on your end if any: … N/A