Download the PHP package alagiesinghateh/laravel-docmaker without Composer
On this page you can find all versions of the php package alagiesinghateh/laravel-docmaker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alagiesinghateh/laravel-docmaker
More information about alagiesinghateh/laravel-docmaker
Files in alagiesinghateh/laravel-docmaker
Package laravel-docmaker
Short Description A Laravel package to generate API documentation from controller annotations
License MIT
Informations about the package laravel-docmaker
Laravel API Doc Generator
A powerful Laravel package that automatically generates comprehensive API documentation from your controller annotations. Supports API Blueprint format with intelligent annotation parsing, authentication detection, and smart backup system.
โจ Features
- Automatic Annotation Generation: Auto-generate
@apiannotations for your controller methods - Smart Parameter Detection: Automatically detects route parameters, form request validation, and model bindings
- Authentication Detection: Intelligent detection of authentication requirements from middleware and parameters
- Backup System: Smart backup system that only creates backups when content changes
- Web Interface: Beautiful web interface to browse your API documentation
- Security: Built-in security with IP whitelisting and user authentication
- Multiple Formats: Supports API Blueprint format with JSON output
- Cross-Platform: Works with any Laravel application
๐ฆ Installation
Install via Composer:
Publish the configuration file:
Publish the views (optional):
โ๏ธ Configuration
After publishing the config file, you can modify config/api-doc-generator.php:
๐ Usage
Generate API Documentation
Regenerate Controller Annotations
Backup Management
๐ Annotation Reference
Basic Annotation Structure
Supported Annotations
| Annotation | Description | Example |
|---|---|---|
@api |
HTTP method and endpoint | @api {GET} /api/users Get Users |
@apiName |
Endpoint name | @apiName GetUsers |
@apiGroup |
Group/category | @apiGroup User |
@apiDescription |
Endpoint description | @apiDescription Get all users |
@apiParam |
Request parameter | @apiParam {String} name User name |
@apiHeader |
Request header | @apiHeader {String} Authorization Bearer token |
@apiSuccess |
Success response field | @apiSuccess {Number} id User ID |
@apiError |
Error response | @apiError {401} Unauthorized |
@apiAuth |
Authentication type | @apiAuth bearer |
@apiMiddleware |
Middleware used | @apiMiddleware auth:api |
@apiPermission |
Required permissions | @apiPermission users.read,users.write |
๐ก๏ธ Security
The package includes built-in security features:
Production Environment
- API documentation is disabled by default in production
- Only allowed users (by email) can access
- IP whitelist support
Development Environment
- Localhost access allowed by default
- Configurable IP restrictions
- User-based access control
Configuration Example
๐ง Advanced Usage
Custom Controller Properties
Manual Annotation Overrides
Integration with Form Requests
๐ Web Interface
Access the web interface at:
http://your-app.com/api-docs
![API Documentation Interface]
Customizing the Web Interface
Publish the views and modify them as needed:
Views will be published to:
resources/views/vendor/api-doc-generator/
๐ Backup System
The package includes a smart backup system:
- Automatic Backups: Created only when documentation content changes
- Configurable Retention: Keep last N backups (default: 10)
- Easy Restoration: Restore from any backup via artisan commands
- Content-based: Backups are created based on content changes, not file modifications
๐งช Testing
Run the package tests:
๐ค Contributing
We welcome contributions! Please see CONTRIBUTING.md for details.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This package is open-source software licensed under the MIT license.
๐ Bug Reports
If you discover any bugs, please create an issue on GitHub.
๐ Support
For support and questions:
- Create an issue on GitHub
- Email: [email protected]
- Documentation: GitHub Wiki
๐ Acknowledgments
- Inspired by various API documentation generators
- Built with the Laravel framework
- Thanks to all contributors
Note: This package is actively maintained. For the latest updates and features, always check the GitHub repository.
All versions of laravel-docmaker with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/filesystem Version ^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.5