Skip to content

Commit

Permalink
Update docs how it works image and small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chadidi committed Dec 26, 2021
1 parent 9f52c5f commit 1a5d1a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class Item extends Model
protected $translatable = [
'name'
];

/**
* The model used to get translatios.
*
Expand Down Expand Up @@ -144,10 +144,10 @@ $posts = Post::withTranslations()->get();
$posts = Post::withTranslations(['en', 'da'])->get();

// Loads specific locale translations
$posts = Post::withTranslation('da')->get();
$posts = Post::withTranslations('da')->get();

// Loads current locale translations
$posts = Post::withTranslation('da')->get();
$posts = Post::withTranslations('da')->get();
```

### Get default language value
Expand Down Expand Up @@ -205,7 +205,7 @@ This will update or create the translation for title of the post with the locale

### Query translatable Models

To search for a translated value, you can use the `whereTranslation` method.
To search for a translated value, you can use the `whereTranslation` method.
For example, to search for the slug of a post, you'd use

```php
Expand Down
Binary file modified images/current_working_model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1a5d1a4

Please sign in to comment.