Download the PHP package ge-tracker/spatie-generators without Composer
On this page you can find all versions of the php package ge-tracker/spatie-generators. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ge-tracker/spatie-generators
More information about ge-tracker/spatie-generators
Files in ge-tracker/spatie-generators
Package spatie-generators
Short Description Artisan make generators for Spatie Actions and DTO
License MIT
Homepage https://github.com/ge-tracker/spatie-generators
Informations about the package spatie-generators
Spatie Generators
This package adds artisan:make
commands to generate an Action or Data Transfer Object.
Installation
-
Install Spatie Generators
- The service provider will be automatically loaded - installation complete!
Usage
Generating an Action
Running the following command will generate a TestAction
into the app/Actions
directory.
The -d
or -m
parameters can be optionally specified to generate the action into a Domain
or Modules
directory. If both parameters are supplied, domain will take precedence.
The following command will generate a TestAction
into the app/Domain/Example/Actions
directory.
Generating a DTO
A DTO can be generated in the same way as an action, and supports both the -d
and -m
parameters.
A DTO can also be a collection of DTOs, which is handled automatically by Spatie's package. Spatie Generators will attempt to automatically decide the name of your target data object, to avoid any manual configuration.
Will generate the following class:
Contributors
All versions of spatie-generators with dependencies
spatie/laravel-queueable-action Version ^2.5
spatie/data-transfer-object Version ^3.0
illuminate/console Version ^8.0|^9.0
illuminate/support Version ^8.0|^9.0