Description
OpenApi or Swagger Specification for your Laravel project made easy
In order to generate the Swagger/OpenApi documentation for your API, Swagger offers a set of annotations to declare and manipulate the output. These annotations can be added to your controller, model, or even a separate file. An example of OpenApi annotations can be found here.
After the annotations have been added you can run php artisan l5-swagger:generate to generate the documentation.
Alternatively, you can set L5_SWAGGER_GENERATE_ALWAYS to true in your .env file so that your documentation will automatically be generated. Make sure your settings in config/l5-swagger.php are complete.
Recent Courses on Laravel Daily
AI Agents/IDEs for Laravel: May 2026 (Claude Code, Codex, OpenCode, etc)
7 lessons
52 min
Next.js Basics for Laravel Developers
11 lessons
58 min
How to Build Laravel 13 API From Scratch
30 lessons
1 h 23 min