mzshovon/auto-repo
最新稳定版本:1.0.7
Composer 安装命令:
composer require mzshovon/auto-repo
包简介
Single command repo generation for Laravel
README 文档
README
Laravel single command repository pattern generator with automatic binding.
Installation
You can install the package using composer:
composer require mzshovon/auto-repo
Register providers to your app config file.
Mzshovon\AutoRepo\RepositoryServiceProvider::class, Mzshovon\AutoRepo\BindServiceProvider::class,
Great! Now your setup is done and you are ready to generate repository lifecycle in laravel via single command.
# For only generate interface with specific functions
php artisan generate:repo Test
Then it will ask for:
Do you want to bind model? > yes # It will generate the model repo
If it is "no" Then it will ask for:
Do you want to bind service? > yes # It will generate the service repo
Please make sure to cache the config after register providers.
php artisan config:cache
No need to bind! Just use your contract to access repository instances from anywhere.
License
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-01