judeufuoma / api-toolkit
A Laravel package that generates Postman-compatible API collections.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/judeufuoma/api-toolkit
Requires
- php: ^8.0
- illuminate/support: ^9.0|^10.0|^11.0|^12.0
- phpdocumentor/reflection-docblock: ^5.6
- spatie/laravel-package-tools: ^1.14
Requires (Dev)
- orchestra/testbench: ^10.2
This package is auto-updated.
Last update: 2025-11-24 16:02:58 UTC
README
ApiToolkit is a Laravel package designed to generate Postman-compatible API collections from your defined routes. It will automatically generate collections with API route details, query parameters, request bodies, headers, and authentication, making API testing and documentation easy.
Features
- Automatically generates a Postman collection from Laravel API routes.
- Supports routes with
GET,POST,PUT,PATCH, andDELETEmethods. - Generates query parameters, request bodies, and headers based on route documentation.
- Supports authentication headers (e.g.,
Bearer {{token}}). - Outputs a JSON file that can be directly imported into Postman.
Installation
To install ApiToolkit, follow these steps:
1. Install via Composer
In your Laravel project, run:
composer require judeufuoma/api-toolkit
2. Generate the Postman Collection
Once installed, you can generate the Postman collection by running the following command:
php artisan api-toolkit:generate
This command will:
- Scan your Laravel routes.
- Generate a Postman collection JSON file.
- Include all routes prefixed with api/
Usage
The ApiToolkit will generate a postman_collection.json file in your project’s root directory. You can then import this file into Postman to get a detailed view of your API, including routes, query parameters, request bodies, and headers.
Testing
If you’re contributing to the development of this package or need to run tests, use PHPUnit:
vendor/bin/phpunit
Alternatively, if you need to run tests within the Laravel app that uses the package, run:
php artisan test
Contributing
We welcome contributions! If you have suggestions or improvements, please fork the repository and submit a pull request. If you find any bugs or want to add a feature, please create an issue on GitHub.