code-orange/encryptable

Encryptable trait for Laravel models

v1.2 2020-10-30 12:36 UTC

This package is auto-updated.

Last update: 2024-10-29 06:11:55 UTC


README

This package adds the encryptable trait to your laravel model which automatically encrypts and decrypts them when communicating with the database.

Installation

First, make sure you have the Code Orange package registry set up correctly.

composer require code-orange/encryptable

Usage

Add a protected $encrypted trait to your laravel model. I.E:

protected $encryptable = [
		'first_name', 'last_name', 'country', 'zipcode', 'housenumber', 'street', 'city', 'phone', 'email',
	];