It is about time that we finish this course on building an API with Laravel. We have built an API, added authorization, written an application that uses our API, and written tests for our API. Now, in this last step, we will write documentation for it.
Documenting your code, application, product, API or whatever is a very important task, no matter if you are working alone or in a group. As long as it is something worth documenting, you should write documentation for it. It happened to me so many times. I would create something and in a couple of weeks, I would forget everything about how it works and what it does. Then I would have to read the source code to figure it out. Don't do this.
It is my opinion that it does not matter if you write documentation first, during coding or after everything has finished, as long as you provide documentation at some point.
To document our API we will use API Blueprint language. The reason why it took me so long to complete this course was because I wanted to provide a course on API Blueprint before completing this course.
Prerequisite! To learn what is API Blueprint and how to use it see my course Write better API documentation with API Blueprint.
Laravel makes implementing authentication very simple. We will implement authentication in our existing application.
In this tutorial, we will cover creating, updating, deleting and viewing all multilingual articles.
This is most commonly used in the situation where you have to paginate search results which consist of many different models.
Laravel comes out-of-the-box with great testing suite built on PHPUnit. No API should be left untested.