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

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.

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