rdehnhardt/eloquent-case
Composer 安装命令:
composer require rdehnhardt/eloquent-case
包简介
rdehnhardt Eloquent Case
README 文档
README
Set attributes to upper or lower case automatically. Recommended for business systems.
Installation
Run the following command to get the latest version package
composer require rdehnhardt/eloquent-case
// app/Customer.php namespace App; use Illuminate\Database\Eloquent\Model; use Rdehnhardt\EloquentCase\TransformUpperCase; class Customer extends Model { use TransformUpperCase; /** * The attributes that aren't upper case. (optional) * * @var array */ protected $guardedCase = ['email', 'password']; }
// app/Customer.php namespace App; use Illuminate\Database\Eloquent\Model; use Rdehnhardt\EloquentCase\TransformUpperCase; class Customer extends Model { use TransformLowerCase; /** * The attributes that aren't lower case. (optional) * * @var array */ protected $guardedCase = ['name']; }
Contributing
Contributions are welcomed; to keep things organized, all bugs and requests should be opened on github issues tab for the main project in the rdehnhardt/eloquent-case/issues.
All pull requests should be made to the branch Develop, so they can be tested before being merged into the master branch.
Having problems?
If you are having problems with the use of this package, there is likely someone has faced the same problem. You can find common answers to their problems:
License
The eloquent-case package is open source software licensed under the license MIT
统计信息
- 总下载量: 524
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-21