Skip to content

Commit 6209f81

Browse files
committed
- Update example translations wrapper name to a more descriptive one "_translation_wrapper"
- Make subtitles H4
1 parent 8ef8e7f commit 6209f81

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ $post = Post::create($data);
6868
echo $post->translate('fr')->title; // Mon premier post
6969
```
7070

71-
### Filling multiple translations wrapped
71+
#### Filling multiple translations wrapped
7272

7373
You may define a wrapper property when creating new translations. Set the `translations_wrapper` property in translatable config file:
7474
```php

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ $post = Post::create($data);
5757
echo $post->translate('fr')->title; // Mon premier post
5858
```
5959

60-
### Filling multiple translations wrapped
60+
#### Filling multiple translations wrapped
6161

6262
You may define a wrapper property when creating new translations. Set the `translations_wrapper` property in translatable config file:
6363
```php

tests/TranslatableTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ public function it_creates_translations_using_mass_assignment_and_locales(): voi
227227
#[Test]
228228
public function it_creates_translations_using_wrapped_mass_assignment_and_locales(): void
229229
{
230-
$this->app->make('config')->set('translatable.translations_wrapper', 'translations');
230+
$this->app->make('config')->set('translatable.translations_wrapper', '_translation_wrapper');
231231

232232
$vegetable = Vegetable::create([
233233
'quantity' => 5,
234-
'translations' => [
234+
'_translation_wrapper' => [
235235
'en' => ['name' => 'Peas'],
236236
'fr' => ['name' => 'Pois'],
237237
],

0 commit comments

Comments
 (0)