Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martinbean/eloquent-encryptable
Adds encryptable attributes to Eloquent models, for storing sensitive data.
https://github.com/martinbean/eloquent-encryptable
eloquent encryption laravel
Last synced: 1 day ago
JSON representation
Adds encryptable attributes to Eloquent models, for storing sensitive data.
- Host: GitHub
- URL: https://github.com/martinbean/eloquent-encryptable
- Owner: martinbean
- License: mit
- Archived: true
- Created: 2017-01-28T20:28:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-01-20T11:56:44.000Z (about 4 years ago)
- Last Synced: 2025-01-18T06:43:10.801Z (4 days ago)
- Topics: eloquent, encryption, laravel
- Language: PHP
- Size: 12.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Eloquent Encryptable trait
Adds encryptable attributes to Eloquent models, for storing sensitive data, in Laravel 6.x and 7.x applications.**NOTE:** If you are using Laravel 8.x, you **DO NOT NEED** this package. Laravel offers a native `encrypted` cast that works on strings, collections, and objects. For more information, see [laravel.com/docs/8.x/eloquent-mutators#attribute-casting][2]
## Usage
Simply add the trait to your Eloquent model, and define an array of attributes
whose values should be encrypted in your database in an `$encryptable` property:```php
medical_conditions;
```## License
Licensed under the MIT License.## Support
Please [create an Issue][1] for any problems with this library.[1]: https://github.com/martinbean/eloquent-encryptable/issues/new
[2]: https://laravel.com/docs/8.x/eloquent-mutators#attribute-casting