Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Commit 34a6701

Browse files
awestropeawestrope
authored andcommitted
Swapped headings
The 'Automatically Transform Secure-Text Attributes' and 'Updates with Unique Rules' headings were the wrong way round.
1 parent a6b9eeb commit 34a6701

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,8 @@ function __construct() {
358358
};
359359
}
360360
```
361-
362-
<a name="uniquerules"></a>
363-
## Updates with Unique Rules
361+
<a name="secure"></a>
362+
## Automatically Transform Secure-Text Attributes
364363

365364
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!
366365

@@ -375,9 +374,9 @@ class User extends \LaravelBook\Ardent\Ardent {
375374

376375
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.
377376

377+
<a name="uniquerules"></a>
378+
## Updates with Unique Rules
378379

379-
<a name="secure"></a>
380-
## Automatically Transform Secure-Text Attributes
381380
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.
382381

383382
From the Laravel Documentation:

0 commit comments

Comments
 (0)