🔣 A powerful layer to encode eloquent attributes.
composer require attla/encoded-attributes
Add the Attla\EncodedAttributes\HasEncodedAttributes
trait to your model.
To automatically turn some attribute into an encoded attribute, add a Encoded
or _encoded
suffix.
// getting existed attribute
$model->email
// turning an attribute into an encoded attribute
$model->emailEncoded
// or
$model->email_encoded
If you need validate a encoded attribute with rules: exists
, unique
use the suffix _encoded
.
This package is licensed under the MIT license © Octha.