Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kossiecoder's avatar

Performance: Fractal Transformer vs API resources

I am moving over to API resources from Fractal Transformer.

I am just wondering if their performances are about the same or API resources is significantly faster?

0 likes
1 reply
SilenceBringer's avatar
Level 55

@kossiecoder I don't think they have some sensitive difference in speed

As for me, usually I use API Resources with Eloquent

But in case of using Repository Pattern, I use Fractal Transformers to format data returned from Repository. Important part here is from Repostory to Controller or Service, not to the end user. You can wrap result returned by Repository to Resource before returning to the end user too

Please or to participate in this conversation.