Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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