programic/laravel-rules
Composer 安装命令:
composer require programic/laravel-rules
包简介
Extra rules intance
README 文档
README
This package allows you to manage request validation rules for store and update requests
Installation
This package requires PHP 7.2 and Laravel 5.8 or higher.
composer require programic/laravel-rules
Basic Usage
# Create Task
php artisan make:rule SaveUserRule
Conditions
public funtion base(): array { return [ 'name': 'required,string', 'company': 'required,integer', ]; } public funtion store(): array { return [ 'company': 'exists:companies.id', ]; } public funtion update(): array { return [ 'name': 'nullable', ] }
Custom stub
Custom stubs are supported.
php artisan vendor:publish --provider="Programic\Rules\RulesServiceProvider" --tag="stubs"
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email info@programic.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2023-01-28