You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
Suppose you have an attribute named `password` in your model class, but don't want to store the plain-text version in the database. The pragmatic thing to do would be to store the hash of the original content. Worry not, Ardent is fully capable of transmogrifying any number of secure fields automatically for you!
367
366
@@ -377,9 +376,8 @@ class User extends \LaravelBook\Ardent\Ardent {
377
376
Ardent will automatically replace the plain-text password attribute with secure hash checksum and save it to database. It uses the Laravel `Hash::make()` method internally to generate hash.
378
377
379
378
380
-
<aname="uniquerules"></a>
381
-
## Updates with Unique Rules
382
-
379
+
<aname="secure"></a>
380
+
## Automatically Transform Secure-Text Attributes
383
381
Ardent can assist you with unique updates. According to the Lavavel Documentation, when you update (and therefore validate) a field with a unique rule, you have to pass in the unique ID of the record you are updating. Without passing this ID, validation will fail because Laravel's Validator will think this record is a duplicate.
0 commit comments