File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ docker-compose exec app bash
8080
8181## Usage
8282
83- Because the translation are just a one-to-many relation of the model you can use them the same way as any other
83+ Because the translations are just a one-to-many relation of the model you can use them the same way as any other
8484one-to-many relationship in Laravel. There are a few helper methods to make it easier to use the package, but the base
8585is just a relation.
8686
@@ -144,7 +144,7 @@ $page = App\Page::query()->with('translations')->findOrFail(1);
144144$englishTranslation = $page->translation();
145145```
146146
147- To get the translation of a translated attribute in the current locale the app is in you can call ` translate('attribute') ` .
147+ To get the value of a translated attribute in the current locale the app is in you can call ` translate('attribute') ` .
148148
149149``` php
150150<?php
@@ -156,8 +156,8 @@ $page = App\Page::query()->with('translations')->findOrFail(1);
156156$englishTitle = $page->translate('title');
157157```
158158
159- To get the translation of a translated attribute in a different locale then the current app locale is in you can call
160- ` translate('attribute') ` with the desired locale.
159+ To get the value of a translated attribute in a different locale then the current app locale is in you can call
160+ ` translate('attribute', 'locale' ) ` with the desired locale.
161161
162162``` php
163163<?php
You can’t perform that action at this time.
0 commit comments