Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/faustoq/laravel-model-encrypt-fields
Simple crypt / decrypt for Laravel eloquent models fields
https://github.com/faustoq/laravel-model-encrypt-fields
eloquent encryption-decryption laravel
Last synced: about 1 month ago
JSON representation
Simple crypt / decrypt for Laravel eloquent models fields
- Host: GitHub
- URL: https://github.com/faustoq/laravel-model-encrypt-fields
- Owner: faustoq
- License: mit
- Created: 2020-12-03T13:20:15.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-06T11:43:56.000Z (almost 4 years ago)
- Last Synced: 2024-04-22T00:52:24.818Z (7 months ago)
- Topics: eloquent, encryption-decryption, laravel
- Language: PHP
- Homepage:
- Size: 6.84 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Model Encrypt Fields
Encrypt and decrypt Laravel model fields
## Installation
```
composer require faustoq/laravel-model-encrypt-fields
```Note: The package will be autoregistered thanks to the Laravel Package Auto-Discovery.
Publish the configuration file:
```
php artisan vendor:publish --provider="ModelEncryptFields\ServiceProvider"
```## Usage
```php
name = "John Doe";
$user->save();
```Auto-Decrypt the field `name`:
```
echo "Hello, " . $user->name;
```