@@ -203,7 +203,7 @@ The first approach to handling multiple constraints is using an array syntax. Th
203203User::query()->joinRelation('posts.comments', [
204204 function ($join) { $join->where('is_active', '=', 1); },
205205 function ($join) { $join->where('comments.title', 'like', '%looking for something%'); }
206- } );
206+ ] );
207207```
208208
209209The array syntax supports both sequential and associative variants:
@@ -213,20 +213,20 @@ The array syntax supports both sequential and associative variants:
213213User::query()->joinRelation('posts.comments', [
214214 null,
215215 function ($join) { $join->where('comments.title', 'like', '%looking for something%'); }
216- } );
216+ ] );
217217
218218// Associative
219219User::query()->joinRelation('posts.comments', [
220220 'comments' => function ($join) { $join->where('comments.title', 'like', '%looking for something%'); }
221- } );
221+ ] );
222222```
223223
224224If you're using aliases, the associate array syntax refers to the fully qualified relation:
225225``` php
226226User::query()->joinRelation('posts as articles.comments as threads', [
227227 'posts as articles' => function ($join) { $join->where('is_active', '=', 1); },
228228 'comments as threads' => function ($join) { $join->where('threads.title', 'like', '%looking for something%'); }
229- } );
229+ ] );
230230```
231231
232232<a name =" multiple-constraints-through " ></a >
0 commit comments