trait QueriesRelationships (View source)
Builder|QueriesRelationships | has(string $relation, string $operator = '>=', int $count = 1, string $boolean = 'and', Closure $callback = null) Add a relationship count / exists condition to the query. | |
Builder|QueriesRelationships | orHas(string $relation, string $operator = '>=', int $count = 1) Add a relationship count / exists condition to the query with an "or". | |
Builder|QueriesRelationships | doesntHave(string $relation, string $boolean = 'and', Closure $callback = null) Add a relationship count / exists condition to the query. | |
Builder|QueriesRelationships | whereHas(string $relation, Closure $callback = null, string $operator = '>=', int $count = 1) Add a relationship count / exists condition to the query with where clauses. | |
Builder|QueriesRelationships | orWhereHas(string $relation, Closure $callback = null, string $operator = '>=', int $count = 1) Add a relationship count / exists condition to the query with where clauses and an "or". | |
Builder|QueriesRelationships | whereDoesntHave(string $relation, Closure $callback = null) Add a relationship count / exists condition to the query with where clauses. | |
$this | withCount(mixed $relations) Add subselect queries to count the relations. | |
Builder|QueriesRelationships | mergeConstraintsFrom(Builder $from) Merge the where constraints from another query to the current query. |
Add a relationship count / exists condition to the query.
Add a relationship count / exists condition to the query with an "or".
Add a relationship count / exists condition to the query.
Add a relationship count / exists condition to the query with where clauses.
Add a relationship count / exists condition to the query with where clauses and an "or".
Add a relationship count / exists condition to the query with where clauses.
Add subselect queries to count the relations.
Merge the where constraints from another query to the current query.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.4/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.html