Laravel API documentation


Laravel API documentation


https://laravel-apidoc-generator.readthedocs.io/en/latest/index.html
This generates documenrtation in html formate location public/docs
Note: we have to increase memory_limit of server to 2G
Installation
requirement : PHP 7 and Laravel 5.5 or higher are required.
  1. Run cmd in project root folder
composer require mpociot/laravel-apidoc-generator
2. Publish config file with command
This will create an apidoc.php file in your config folder.
php artisan vendor:publish --provider="Mpociot\ApiDoc\ApiDocGeneratorServiceProvider" --tag=apidoc-config
3. Add this line of code in bootstrap/app.php
$app->register(\Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class);
4. Generate documentation
With this given command.
php artisan apidoc:generate

Share this

Related Posts

Previous
Next Post »