Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
znck committed Dec 4, 2015
1 parent 4b95e3b commit 3b74863
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Within your eloquent model class add following line

```php
class User extends Model {
use \Znck\Eloquent\Relations\BelongsToThroughTrait;
use \Znck\Eloquent\Traits\BelongsToThrough;
...
}
```
Expand All @@ -28,7 +28,7 @@ Consider a blog application. In this app, a country can have many users and a us

```php
class Country extends Model {
use \Znck\Eloquent\Relations\BelongsToThroughTrait;
use \Znck\Eloquent\Traits\BelongsToThrough;

public function articles () {
return $this->hasManyThrough(Article::class, User::class);
Expand All @@ -40,7 +40,7 @@ If we are accessing the country of the article, then we have to use `$article->u

```php
Class Article extends Model {
use \Znck\Eloquent\Relations\BelongsToThroughTrait;
use \Znck\Eloquent\Traits\BelongsToThrough;

public function country() {
return $this->belongsToThrough(Country::class, User::class);
Expand All @@ -54,10 +54,10 @@ Going deeper, `City` -> `District` -> `State` -> `Country`

```php
Class City extends Model {
use \Znck\Eloquent\Relations\BelongsToThroughTrait;
use \Znck\Eloquent\Traits\BelongsToThrough;

public function country() {
return $this->belongsToThrough(Country::class, [State::class, District::class]);
}
}
```
```

0 comments on commit 3b74863

Please sign in to comment.