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