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

taijuten's avatar

Resources on building APIs within Laravel (5)

I'm in the process of building a fairly large API in Laravel 5. I've not had any previous experience of building an API before, but have researched REST thoroughly, I understand the concept, and I've followed all lessons so far in Laracasts' Incremental API series.

Unfortunately, the API series on here is tailored for Laravel 4.x. I do however feel as though I've successfully translated it over into a working Laravel 5 API. The real issue though, is that the series is not complete, and hasn't been updated in a year. I therefore doubt that it will be continued any time soon, due to likely having to be re-recorded for L5.

My questions are:

If anyone is able to provide any advice regarding this, I'd be hugely appreciative.

0 likes
4 replies
davorminchorov's avatar

Most of the things (if not all) covered in the Incremental APIs are still valid in Laravel 5.

I'd recommend the book Build APIs You Won't Hate by Phil Sturgeon, everything you need to know about APIs is covered there.

Fractal works similar to Jeffrey's custom classes and methods, and it has a few extra features but the API might be different. Read the documentation on the website to understand how to use it if you haven't done that yet. (I am guessing you already did read it). What are you struggling with?

2 likes
taijuten's avatar

Thank you Ruffles, I've now purchased that book and will have a read through.

To be honest, although I had Jeffrey's code working fine, I'm having issues translating this into Fractal. I would have imagined that due to the popularity of both Fractal and Laravel, there'd be a resource somewhere for best practices with the two, but alas I've not found any so far.

I'll keep persevering for the moment...

jamieshiers's avatar

+1 for Building Apis You Wont Hate. If you follow the book through it shows how to use fractal as well.

If your looking for an example you can have a look at my repo https://github.com/jamieshiers/Classroom-booking which uses fractal, it's only the beginnings of a project but it might help you out.

1 like

Please or to participate in this conversation.