Overview
WPZylos CLI Devtool provides scaffolding commands for rapid plugin development.
| Command | Description |
|---|
make:provider | Generate service provider class |
make:job | Generate queued job class |
make:service | Generate service class |
make:trait | Generate PHP trait |
make:enum | Generate PHP 8.1 enum |
make:exception | Generate custom exception class |
make:interface | Generate PHP interface |
| Command | Description |
|---|
make:command | Generate custom CLI command |
make:cron | Generate WordPress cron handler |
| Command | Description |
|---|
make:controller | Generate controller class |
make:middleware | Generate HTTP middleware class |
make:request | Generate FormRequest class |
make:rest | Generate WordPress REST controller |
make:ajax | Generate WordPress AJAX handler |
make:resource | Generate API resource transformer |
| Command | Description |
|---|
make:migration | Generate migration file |
make:model | Generate model class |
make:seeder | Generate database seeder class |
make:factory | Generate model factory for testing |
make:observer | Generate model lifecycle observer |
make:scope | Generate reusable query scope |
make:cast | Generate custom attribute cast |
| Command | Description |
|---|
make:event | Generate event class |
make:listener | Generate event listener class |
make:subscriber | Generate event subscriber class |
| Command | Description |
|---|
make:mail | Generate mailable notification class |
make:notification | Generate multi-channel notification |
| Command | Description |
|---|
make:rule | Generate validation rule class |
make:policy | Generate authorization policy |
| Command | Description |
|---|
make:test | Generate PHPUnit test class |
| Command | Description |
|---|
make:config | Generate configuration file |
| Command | Description |
|---|
make:posttype | Generate custom post type class |
make:taxonomy | Generate custom taxonomy class |
make:metabox | Generate metabox class |
make:menu | Generate admin menu class |
make:settings | Generate settings page class |
make:widget | Generate widget class |
make:shortcode | Generate shortcode class |
make:block | Generate Gutenberg block (folder-based) |
make:columns | Generate admin list table columns |
make:action | Generate WordPress action hook handler |
make:filter | Generate WordPress filter hook handler |
# Foundation
vendor/bin/wpzylos make:service PaymentService
vendor/bin/wpzylos make:enum Status --plain
vendor/bin/wpzylos make:interface Contracts/PaymentGateway
# HTTP & REST
vendor/bin/wpzylos make:controller ProductController --resource
vendor/bin/wpzylos make:rest OrderController --route=orders
vendor/bin/wpzylos make:ajax SearchProducts --public
# Database
vendor/bin/wpzylos make:migration create_products_table --create=products
vendor/bin/wpzylos make:factory UserFactory --model=User
vendor/bin/wpzylos make:observer OrderObserver --model=Order
# WordPress
vendor/bin/wpzylos make:block HeroBanner --title="Hero Banner" --category=design
vendor/bin/wpzylos make:cron CleanupExpiredTokens --recurrence=hourly
vendor/bin/wpzylos make:action SendWelcomeEmail --hook=user_register
vendor/bin/wpzylos make:shortcode Gallery --tag=photo_gallery
| Command | Output Path |
|---|
make:controller | app/Http/Controllers/ |
make:request | app/Http/Requests/ |
make:rest | app/Http/Rest/ |
make:ajax | app/Http/Ajax/ |
make:resource | app/Http/Resources/ |
make:middleware | app/Http/Middleware/ |
make:model | app/Models/ |
make:observer | app/Observers/ |
make:scope | app/Models/Scopes/ |
make:cast | app/Casts/ |
make:migration | database/migrations/ |
make:seeder | database/seeders/ |
make:factory | database/factories/ |
make:provider | app/Providers/ |
make:service | app/Services/ |
make:job | app/Jobs/ |
make:event | app/Events/ |
make:listener | app/Listeners/ |
make:subscriber | app/Listeners/ |
make:mail | app/Mail/ |
make:notification | app/Notifications/ |
make:rule | app/Rules/ |
make:policy | app/Policies/ |
make:trait | app/Traits/ |
make:enum | app/Enums/ |
make:exception | app/Exceptions/ |
make:interface | app/Contracts/ |
make:command | app/Console/Commands/ |
make:cron | app/Console/Cron/ |
make:test | tests/Unit/ |
make:config | config/ |
make:posttype | app/PostTypes/ |
make:taxonomy | app/Taxonomies/ |
make:metabox | app/Metaboxes/ |
make:menu | app/Menus/ |
make:settings | app/Settings/ |
make:widget | app/Widgets/ |
make:shortcode | app/Shortcodes/ |
make:block | app/Blocks/<Name>/ |
make:columns | app/Columns/ |
make:action | app/Actions/ |
make:filter | app/Filters/ |