rdehnhardt / eloquent-case
rdehnhardt Eloquent Case
8.0.1
2021-05-21 15:54 UTC
Requires
- php: >=5.5.0
- illuminate/support: 8.*
Requires (Dev)
- phpspec/phpspec: ~2.1
- phpunit/phpunit: ~4.0
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