Skip to content

Commit 01c59e4

Browse files
committed
Add icons to README
1 parent 7e93eea commit 01c59e4

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ But then you want to make sure each translation is unique for its language.
1717

1818
That's where this package comes in to play.
1919

20-
## Requirements
20+
## Requirements
2121

2222
- PHP >= 7.0
2323
- MySQL >= 5.7
2424
- [Laravel](https://laravel.com/) >= 5.5
2525
- [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable)
2626

27-
## Installation
27+
## 📦 Installation
2828

2929
Require the package via Composer:
3030

@@ -33,11 +33,11 @@ composer require codezero/laravel-unique-translation
3333
```
3434
Laravel will automatically register the [ServiceProvider](https://github.com/codezero-be/laravel-unique-translation/blob/master/src/UniqueTranslationServiceProvider.php).
3535

36-
## Usage
36+
## 🛠 Usage
3737

3838
For the following examples, I will use a `slug` in a `posts` table as the subject of our validation.
3939

40-
### Validate a Single Translation
40+
### ☑️ Validate a Single Translation
4141

4242
Your form can submit a single slug:
4343

@@ -63,7 +63,7 @@ $attributes = request()->validate([
6363
]);
6464
```
6565

66-
### Validate an Array of Translations
66+
### ☑️ Validate an Array of Translations
6767

6868
Your form can also submit an array of slugs.
6969

@@ -82,7 +82,7 @@ $attributes = request()->validate([
8282
]);
8383
```
8484

85-
### Specify a Column
85+
### ☑️ Specify a Column
8686

8787
Maybe your form field has a name of `post_slug` and your database field `slug`:
8888

@@ -94,7 +94,7 @@ $attributes = request()->validate([
9494
]);
9595
```
9696

97-
### Specify a Database Connection
97+
### ☑️ Specify a Database Connection
9898

9999
If you are using multiple database connections, you can specify which one to use by prepending it to the table name, separated by a dot:
100100

@@ -106,7 +106,7 @@ $attributes = request()->validate([
106106
]);
107107
```
108108

109-
### Ignore a Record with ID
109+
### ☑️ Ignore a Record with ID
110110

111111
If you're updating a record, you may want to ignore the post itself from the unique check.
112112

@@ -118,7 +118,7 @@ $attributes = request()->validate([
118118
]);
119119
```
120120

121-
### Ignore Records with a Specific Column and Value
121+
### ☑️ Ignore Records with a Specific Column and Value
122122

123123
If your ID column has a different name, or you just want to use another column:
124124

@@ -130,7 +130,7 @@ $attributes = request()->validate([
130130
]);
131131
```
132132

133-
### Use Additional Where Clauses
133+
### ☑️ Use Additional Where Clauses
134134

135135
You can add 4 types of where clauses to the rule.
136136

@@ -174,7 +174,7 @@ $attributes = request()->validate([
174174
]);
175175
```
176176

177-
## Example
177+
## 🖥 Example
178178

179179
Your existing `slug` column (JSON) in a `posts` table:
180180

@@ -205,7 +205,7 @@ The result is that `slug[en]` is valid, since the only `en` value in the databas
205205

206206
And `slug[nl]` would fail, because there already is a `nl` value of `abc`.
207207

208-
## Error Messages
208+
## ⚠️ Error Messages
209209

210210
Whether you are validating a single translation (`'slug'`) or an array of translations (`'slug.*'`), if validation fails, you will find an error for both the single and the localized key:
211211

@@ -226,20 +226,20 @@ $attributes = request()->validate([
226226
]);
227227
```
228228

229-
## Testing
229+
## 🚧 Testing
230230

231231
```
232232
vendor/bin/phpunit
233233
```
234234

235-
## Security
235+
## 🔐 Security
236236

237237
If you discover any security related issues, please [e-mail me](mailto:[email protected]) instead of using the issue tracker.
238238

239-
## Changelog
239+
## 📖 Changelog
240240

241241
See a list of important changes in the [changelog](https://github.com/codezero-be/laravel-unique-translation/blob/master/CHANGELOG.md).
242242

243-
## License
243+
## 📜 License
244244

245245
The MIT License (MIT). Please see [License File](https://github.com/codezero-be/laravel-unique-translation/blob/master/LICENSE.md) for more information.

0 commit comments

Comments
 (0)