@hrodrigues1984
Nothing here yet.
Nothing here yet.
No blogs yet.
It's important to know the role of the API in your architecture and understand that documentation is very important to other developers or for your future self so in this matter I recommend http://apidocjs.com/ . It helps you generating a nice documentation based on comments using a defined structure and it leverages versioning that could help you in the future. Another thing that's important to keep in mind is that an API should be stateless, so you should use laravel's 'api' middleware, some developers struggle with this issue, I know I have. For functional testing use https://www.getpostman.com/ or https://insomnia.rest/. However you should always write unit tests for code, I know that this isn't always possible write them as much as possible. Regarding packages, it always depends on the purpose of the API but i recommend, for: Authentication: https://github.com/tymondesigns/jwt-auth/wiki/Installation. You don't really need to use Passport for authentication, a simple JWT should do the trick. Transformers: http://fractal.thephpleague.com/. Usually as the API grows so does the complexity of the presentation and transformation layer and fractal really provides a easier way to transform your data before returning the requests. CORS: https://github.com/barryvdh/laravel-cors. Depending on the purpose of the API you could need to expose some headers and increase your API security. You can learn more at https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS.