Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
znck committed Nov 17, 2015
1 parent c9b9af9 commit 0750446
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ First, pull in the package through Composer.

```js
"require": {
"znck/belongs-to-through": "~1.0"
"znck/belongs-to-through": "~2.0"
}
```

Expand Down Expand Up @@ -50,3 +50,14 @@ Class Article extends Model {

Now, the magic: `$article->country`

Going deeper, `City` -> `District` -> `State` -> `Country`

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

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

0 comments on commit 0750446

Please sign in to comment.