Skip to content

Commit

Permalink
Fix relation type.
Browse files Browse the repository at this point in the history
  • Loading branch information
goldmont authored Dec 29, 2024
1 parent 8fd3024 commit e41d0b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ class Supplier extends Model

The first array parameter passed to the `$hasOneThrough` property is the name of the final model we wish to access, while the `through` key is the name of the intermediate model.

Typical foreign key conventions will be used when performing the relationship's queries. If you would like to customize the keys of the relationship, you may pass them as the `key`, `otherKey` and `throughKey` parameters to the `$hasManyThrough` definition. The `key` parameter is the name of the foreign key on the intermediate model, the `throughKey` parameter is the name of the foreign key on the final model, while the `otherKey` is the local key.
Typical foreign key conventions will be used when performing the relationship's queries. If you would like to customize the keys of the relationship, you may pass them as the `key`, `otherKey` and `throughKey` parameters to the `$hasOneThrough` definition. The `key` parameter is the name of the foreign key on the intermediate model, the `throughKey` parameter is the name of the foreign key on the final model, while the `otherKey` is the local key.

```php
// Property style
Expand Down

0 comments on commit e41d0b6

Please sign in to comment.