Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/arzeroid/laravel-model-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-encryptable

eloquent eloquent-models laravel laravel-framework laravel-package

Last synced: 5 days 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 Encryptable

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

# 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

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

```php