submtd / laravel-encrypted-fields
Provides a trait that allows for encrypted fields on an Eloquent model
Installs: 107
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/submtd/laravel-encrypted-fields
Requires
- php: >=5.3
This package is auto-updated.
Last update: 2025-10-09 00:49:30 UTC
README
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',
];
}