https://github.com/arzeroid/laravel-model-ssh-encryptable
A simple trait to encrypt attributes before saving to the database and to decrypt attributes before using their values.
https://github.com/arzeroid/laravel-model-ssh-encryptable
Last synced: about 2 months ago
JSON representation
A simple trait to encrypt attributes before saving to the database and to decrypt attributes before using their values.
- Host: GitHub
- URL: https://github.com/arzeroid/laravel-model-ssh-encryptable
- Owner: arzeroid
- License: mit
- Created: 2020-02-24T16:47:03.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-26T10:01:47.000Z (about 5 years ago)
- Last Synced: 2025-01-25T20:13:42.052Z (4 months ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Model SSH Encryptable
A simple trait to encrypt attributes using public key before saving to the database and to decrypt attributes using private key before using their values
# Installation
Simply add the following line to your `composer.json` and run `composer update`
```
"arzeroid/laravel-model-ssh-encryptable": "^1.0",
```Or use composer to add it with the following command
```
composer require "arzeroid/laravel-model-ssh-encryptable"
```# Usage
1. Add the trait to your model and set your attributes to be encrypted in **encryptable** array
```php