Help with replacing Fractal with Laravel Data #1102
Unanswered
alexevladgabriel
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I'm looking to use Laravel Data, to replace the actual Fractal, to make Dedoc Scramble parse easier the types in Swagger.
I was curious, how I could achieve the same thing or what or how I should handle it?
Example:
https://github.com/pelican-dev/panel/blob/1a4fa5e67a7709ade51e968d046c6748e34d5589/app/Transformers/Api/Client/ServerTransformer.php#L39
My current ideas were to create a generic ServerData and then create another ServerResource extending LaravelData/Resource where I compute the values from ServerData as needed to return the same response.
Beta Was this translation helpful? Give feedback.
All reactions