PHPackages                             arzeroid/laravel-model-ssh-encryptable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. arzeroid/laravel-model-ssh-encryptable

ActiveLibrary[Database &amp; ORM](/categories/database)

arzeroid/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

v1.2(6y ago)015MITPHPPHP &gt;=5.4.0

Since Feb 24Pushed 6y ago1 watchersCompare

[ Source](https://github.com/arzeroid/laravel-model-ssh-encryptable)[ Packagist](https://packagist.org/packages/arzeroid/laravel-model-ssh-encryptable)[ RSS](/packages/arzeroid-laravel-model-ssh-encryptable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Laravel Model SSH Encryptable
=============================

[](#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
============

[](#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
=====

[](#usage)

1. Add the trait to your model and set your attributes to be encrypted in **encryptable** array

```
