Skip to content

Commit 31830f1

Browse files
committed
Update README.md
1 parent 3ea2a31 commit 31830f1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ For example:
2727

2828
public $encryptable = ['first_name', 'last_name', 'address_line_1', 'postcode'];
2929
}
30+
31+
# How it Works?
32+
33+
By including the ElocryptTrait, the __set() and __get() methods provided by Eloquent are overridden
34+
to include an additional step. This additional step simply checks whether the attribute being
35+
set or get is included in the "encryptable" array on the model, and either encrypts/decrypts it accordingly
36+
OR calls the parent __set() or __get() method.

0 commit comments

Comments
 (0)