thuraaung2493 / laravel-make-files-tools
一个用于为 Laravel 项目创建 DTO、Action 和 Service 类的小型 CLI 工具。
dev-main
2023-05-27 09:34 UTC
Requires
- php: ^8.1
- illuminate/console: ^9.22|^10.2
- illuminate/support: ^9.22|^10.2
- thecodingmachine/phpstan-safe-rule: ^1.2
Requires (Dev)
- laravel/pint: ^1.10
- nunomaduro/mock-final-classes: ^1.2
- orchestra/testbench: ^8.5.1
- pestphp/pest: ^1.23
- pestphp/pest-plugin-laravel: ^1.4
This package is auto-updated.
Last update: 2024-09-27 12:28:28 UTC
README
它支持 Laravel 9+ 和 PHP 8.1+
描述
此包是一个用于创建 Action 类、DTO 类和 Service 类的小型 CLI 工具。
安装
Laravel
使用以下命令使用 composer 安装此包
composer require thuraaung2493/laravel-make-files-tools@dev
用法
创建 DTO 类
php artisan make:dto NewUser --pest // created in App\DataObjects\NewUser.php & tests/Feature/DataObject/NewUserTest.php
创建 Action 类
php artisan make:action CreateUserAction --pest // created in App\Actions\CreateUserAction.php & tests/Feature/Actions/CreateUserActionTest.php
创建 Service 类
php artisan make:service NotificationService --pest // created in App\Services\NotificationService.php & tests/Feature/Services/NotificationServiceTest.php