PHPackages                             arzeroid/laravel-model-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-encryptable

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

arzeroid/laravel-model-encryptable
==================================

A simple trait to encrypt attributes before saving to the database and to decrypt attributes before using their values

v1.0.0(6y ago)07MITPHPPHP &gt;=5.4.0

Since Nov 27Pushed 6y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

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

[](#laravel-model-encryptable)

A simple trait to encrypt attributes before saving to the database and to decrypt attributes before using their values.

Installation
============

[](#installation)

Simply add the following line to your `composer.json` and run `composer update`

```
"arzeroid/laravel-model-encryptable": "^1.0",

```

Or use composer to add it with the following command

```
composer require "arzeroid/laravel-model-encryptable"

```

Usage
=====

[](#usage)

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

```
