originphp / generate
OriginPHP Generate Plugin. Generates code using boilerplate templates ready for use.
Installs: 364
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:originphp-plugin
Requires
- php: >=7.3.0
- originphp/framework: ^3.14
- originphp/plugin-installer: ^1.3|^2.0
Requires (Dev)
- phpstan/phpstan: ^0.12.64
- phpunit/phpunit: ^9.2
README
This is the code generation plugin for the OriginPHP framework.
Installation
To install this package
$ composer require originphp/generate
Generators
To run the interactive generator
$ bin/console generate
concern_controller Generates a Concern for a Controller
concern_model Generates a Concern for a Model
command Generates a Command class
component Generates a Component class
controller Generates a Controller class
entity Generates an Entity class
exception Generates an Exception class
fixture Generates a Fixture class
form Generates a Form class (tableless model)
helper Generates a Helper class
job Generates a Job class
listener Generates a Listener class
mailbox Generates a Mailbox class
mailer Generates a Mailer class
model Generates a Model class
middleware Generates a Middleware class
migration Generates a Migration class
plugin Generates a Plugin skeleton
query Generates a Query Object class
record Generates a Record class (tableless model)
repository Generates a Repository for a Model
scaffold Generates a MVC using the database
service Generates a Service Object class
Which generator?
To generate a class
$ bin/console generate controller Users
To generate a class in a Plugin folder
$ bin/console generate controller MyPlugin.Users
For more information see Code Generation Guide.