421c/autodoc-laravel

Automatic OpenApi documentation and TypeScript generation tool for Laravel projects
1,628 12
Install
composer require 421c/autodoc-laravel
Latest Version:v2.2.3
PHP:^8.5
Laravel:6 – 13
License:MIT
Last Updated:Oct 19, 2026
Links: GitHub  ·  Packagist
Maintainer: edzus

PHP autodoc-laravel

This is a Laravel integration of PHP autodoc.

PHP autodoc automatically generates up-to-date OpenAPI 3.1.0 documentation and TypeScript types directly from your PHP code. PHPDoc annotations are supported if present, but completely optional.

This package provides seamless integration with Laravel routes, request validation, query builder, database models, API resources, and more.

Visit phpautodoc.com to see full documentation.

Installation

To install PHP autodoc in a Laravel project, simply install the 421c/autodoc-laravel package.

composer require 421c/autodoc-laravel

Then copy configuration file to your project using the command below.

php artisan vendor:publish --provider="AutoDoc\Laravel\Providers\AutoDocServiceProvider"

Open your config/autodoc.php file and set openapi_export_dir setting to a directory where you want to save OpenApi 3.1.0 schema JSON files generated by this package. Make sure this directory exists and is writable.

In your configuration file you can also specify URL to your API docs page with laravel.url setting. If you left it unchanged, you can visit /api-docs route to see the generated documentation.

To improve the generated documentation, see tips to improve the generated documentation.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

598,760,099 34,966
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

403,217,078 4,664

Version History

Version Released PHP Laravel License
v2.2.3 ^8.5 ^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0||^13.0 MIT
v2.2.2 ^8.5 ^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0||^13.0 MIT
v2.2.1 ^8.5 ^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0||^13.0 MIT
v2.2.0 ^8.5 ^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0||^13.0 MIT
v2.1.0 ^8.5 ^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0||^13.0 MIT