web-id/persil

这是我的包 persil

3.0.0 2023-10-11 14:32 UTC

This package is auto-updated.

Last update: 2024-09-11 17:06:13 UTC


README

安装

使用 composer 安装此包。建议仅用于开发环境安装此包。

composer require web-id/persil --dev

Laravel 使用包自动发现,因此不需要手动添加 ServiceProvider。

发布与 Larastan 兼容的 Laravel 模板

模板列表: 这里

php artisan vendor:publish --tag=custom-laravel-stubs

生成仓库文件

空仓库

php artisan make:repository UserRepository

包含所需方法的仓库

php artisan make:repository UserRepository --update --delete

包含 all, store, update, delete 方法的仓库

php artisan make:repository UserRepository --resource

使用缓存系统的仓库

php artisan make:repository UserRepository --update --delete --cache
php artisan make:repository UserRepository --resource --cache

可用方法(选项)列表

生成服务文件

在 app/Services 下创建服务文件 (模板)

php artisan make:service PaymentService

创建服务文件,包含 测试服务文件接口提供者

php artisan make:service PaymentService --provider

鸣谢

许可

MIT 许可证 (MIT)。有关更多信息,请参阅 许可文件