cupskydev/repository-maker

v1.2.1 2023-01-31 08:31 UTC

This package is auto-updated.

Last update: 2024-09-17 11:12:10 UTC


README

在您的 Laravel 项目中轻松生成仓库和接口文件。

安装

您需要通过 composer 安装它

$ composer require cupskydev/repository-maker

生成新的仓库文件

$ php artisan make:repository NewRepository

它将在 App\Repositories 中生成名为 "NewRepository" 的仓库文件

生成带有接口文件的新仓库

$ php artisan make:repository NewRepository --i

它将在 App\Repositories 中生成名为 "NewRepository" 的仓库文件,在 App\Repositories\Interfaces 中生成名为 "NewRepositoryInterface" 的接口文件

新更新

生成新的服务文件

$ php artisan make:service NewService

它将在 App\Services 中生成名为 "NewService" 的服务文件

生成带有接口文件的新服务

$ php artisan make:service NewService --i

它将在 App\Services 中生成名为 "NewService" 的服务文件,在 App\Services\Interfaces 中生成名为 "NewServiceInterface" 的接口文件