PHPackages                             crisjohn02/encrypter - 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. [Security](/categories/security)
4. /
5. crisjohn02/encrypter

ActiveLibrary[Security](/categories/security)

crisjohn02/encrypter
====================

Column encrypter

032PHP

Since Aug 6Pushed 6y agoCompare

[ Source](https://github.com/crisjohn02/encrypter)[ Packagist](https://packagist.org/packages/crisjohn02/encrypter)[ RSS](/packages/crisjohn02-encrypter/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Two-Way Column Encryption
=================================

[](#laravel-two-way-column-encryption)

What this package is all about?
-------------------------------

[](#what-this-package-is-all-about)

This package will automatically encrypt when storing and decrypt when retrieving eloquent using the laravel encryption method. This can be useful when someone illegally downloaded the database and will render the data useless. The salt is user specific so all data cannot be decrypted in just one salt value. **Please note that once you lose the salt values the encrypted data cannot be decrypted again, so be careful when using this package.**

Installation
------------

[](#installation)

```
composer require crisjohn02/encrypter

```

Usage
-----

[](#usage)

Create your user table with a `salt` column.

```
Schema::create('users', function(Blueprint $table) {
    $table->string('salt');
});

```

To automatically create salt values, add trait `HasSalt` into your User model

```
