One of the most important but overlooked things is to document your API for future clients, whether they would come from a JS front-end, or a mobile app. Things like:
- Endpoints
- Parameters
- Auth mechanism
- Example responses
Luckily, there are a few Laravel packages that allow you to generate such docs automatically. You configure things you need, by modifying the config file and adding some comments to your routes/controllers, then you run an Artisan command, and it saves the static HTML files to a public folder on your server. As a result, you can just send the link to it, to your API consumers.
My personal favorite package for this is called Scribe, and we will use exactly that one.
Thanks Povilas, very good resource!! Let's go for the second part? like Front-ent integration or payment? haha keep the good job!
I second the frontend integration!
Front-end integration tutorials for Vue and React are already in progress, for February :)
im excited for the front-end integration! thanks Povilas!
I will try to be as active as Andy in the comments too :) Look forward to the frontend integration - i'm doing a frontend integration in Vue now so it will be good to compare my 'attempt' to yours (your frontend will be a 100x better I am sure lol)
@Gavin I'm not a front-ender at all, so I wouldn't fully count on my implementation being better :)
Thank you! Very nice tutorial!