Download the PHP package aliirfaan/citronel-external-service-generator without Composer
On this page you can find all versions of the php package aliirfaan/citronel-external-service-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aliirfaan/citronel-external-service-generator
More information about aliirfaan/citronel-external-service-generator
Files in aliirfaan/citronel-external-service-generator
Package citronel-external-service-generator
Short Description Generate configuration and classes to consume an external service. Use in conjuction with aliirfaan/citronel-external-service
License MIT
Informations about the package citronel-external-service-generator
Citronel external service generator
Generate configuration and classes to consume an external service that use the package aliirfaan/citronel-external-service
.
Features
- Generate a configuration file based on a format.
- Generate service class to consume external service.
- Custom stub to generate service class, models, events and listeners.
- Helper function for caching responses.
Requirements
Installation
- Install the package using composer:
Usage
An example of how to consume an example external service httpbin.
Generate configuration
To generate configuration file we call the command citronel:external-service-generate:config {external_service_name}
. Replace {external_service_name} with a sensible name for your external service.
Migration and models
Generating external service request migration and model
-
Generate migration using custom stub. Name your model accordingly before running the command.
- Add your custom columns to the newly generated migration
Generating external service response migration and model
-
Generate migration using custom stub. Name your model accordingly before running the command.
- Add your custom columns to the newly generated migration
Run your newly generated migration to create tables
Request/response events
Generating external service request event
- Generate request event using custom stub. Name your event accordingly before running the command.
Generating external service response event
- Generate response event using custom stub. Name your event accordingly before running the command.
Listener
Generating event subscriber
- Generate subscriber using custom stub. Name your listener accordingly before running the command.
Service
Generating service clas
- Generate service using custom stub. Name your service accordingly before running the command.
aliirfaan/citronel-external-service
- See documentation of
aliirfaan/citronel-external-service
package on how to use newly generated classes.
All versions of citronel-external-service-generator with dependencies
laravel/framework Version >=11.0
aliirfaan/citronel-external-service Version ^1.0