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

jgravois's avatar

From Incremental API to Fractal -- Where to begin?

I use an API designed using the series -- Incremental API. It is becoming increasingly complex with subobjects of related tables that are themselves related to other tables, etc. I am also struggling mightily with 3rd generation transforming -- i.e., I cast a value to boolean in FarmsTransformer but it returns to a string value in LoansTransformer.

That said, I remembered that @JeffreyWay mentioned the Sturgeon package, Fractal, as excellent but beyond the scope of our series.

I am thinking maybe my need for a better API is outweighing my lack of Laravel experience and I am thinking about trying to use Fractal.

If anyone is using Fractal, any advice on how I could make this transformation from where @JeffreyWay left us in Incremental API to Fractal would be greatly appreciated.

0 likes
0 replies

Please or to participate in this conversation.