Download the PHP package mertcanureten/laravel-postman-collection without Composer
On this page you can find all versions of the php package mertcanureten/laravel-postman-collection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mertcanureten/laravel-postman-collection
More information about mertcanureten/laravel-postman-collection
Files in mertcanureten/laravel-postman-collection
Package laravel-postman-collection
Short Description A Laravel package to generate Postman collections from API routes.
License
Informations about the package laravel-postman-collection
Laravel Postman Collection
This is a Laravel package that allows you to generate a Postman collection from your Laravel API routes and export it for easy import into the Postman application.
Features
- 🔄 Automatically generates Postman collection from Laravel API routes
- 🔑 Built-in authentication support (Bearer Token, Basic Auth)
- 📁 Groups API endpoints by their URL prefix for better organization
- 📝 Includes route descriptions from PHPDoc comments
- 🔍 Dynamic model parameter detection
- 🎯 Default headers for JSON API requests
- ⚡ Easy to install and use
Installation
You can install this package via Composer:
Usage
Once the package is installed, you can use the following Artisan command to export your API routes to a Postman collection:
Command Options
--output: Specify the output file name (default:postman_collection.json)--name: Set a custom name for the collection--auth-type: Specify the authentication type (bearer|basic)
Examples
Basic usage:
With custom options:
Generated Collection Features
The generated Postman collection includes:
- Grouped endpoints by URL prefix
- Authentication settings (Bearer Token by default)
- Default headers for JSON API requests:
Accept: application/jsonContent-Type: application/json
- Route descriptions from PHPDoc comments
- Parameter details with types and descriptions
- Pre-configured JSON request bodies
Importing into Postman
After generating the collection, follow these steps to import it into Postman:
- Open Postman
- Click on "Import" in the top-left corner
- Select the generated JSON file
- Click "Import" to add the collection to your workspace
Authentication Setup
The collection comes with pre-configured Bearer Token authentication. To use it:
- Create an environment in Postman
- Add a variable named
auth_token - Set your API token as the variable value
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License. See the LICENSE file for details.