LaravelPackages.net
Acme Inc.
Toggle sidebar
submtd/laravel-encrypted-fields

Provides a trait that allows for encrypted fields on an Eloquent model

107
1
1.0.0004
About submtd/laravel-encrypted-fields

submtd/laravel-encrypted-fields is a Laravel package for provides a trait that allows for encrypted fields on an eloquent model. It currently has 1 GitHub stars and 107 downloads on Packagist (latest version 1.0.0004). Install it with composer require submtd/laravel-encrypted-fields. Discover more Laravel packages by submtd or browse all Laravel packages to compare alternatives.

Last updated

laravel-encrypted-fields

Provides a trait that allows for encrypted fields on an Eloquent model

Installation

composer require submtd/laravel-encrypted-fields

Usage

Add the HasEncryptedFields trait to your model class, and add a protected property called $encrypted containing an array of fields that should be encrypted.

<?php

use Illuminate\Database\Eloquent\Model;
use Submtd\LaravelCustomLog\HasEncryptedFields;

class Person extends Model
{
    use HasEncryptedFields;
    
    protected $encrypted = [
        'social_security_number',
    ];
}

Star History Chart