Skip to content

Commit d7714d8

Browse files
Merge pull request #35 from jonnott/patch-1
correct closing array brackets in readme
2 parents 96e7d6d + d9a19c9 commit d7714d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ The first approach to handling multiple constraints is using an array syntax. Th
204204
User::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

210210
The array syntax supports both sequential and associative variants:
@@ -214,20 +214,20 @@ The array syntax supports both sequential and associative variants:
214214
User::query()->joinRelation('posts.comments', [
215215
null,
216216
function ($join) { $join->where('comments.title', 'like', '%looking for something%'); }
217-
});
217+
]);
218218

219219
// Associative
220220
User::query()->joinRelation('posts.comments', [
221221
'comments' => function ($join) { $join->where('comments.title', 'like', '%looking for something%'); }
222-
});
222+
]);
223223
```
224224

225225
If you're using aliases, the associate array syntax refers to the fully qualified relation:
226226
```php
227227
User::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

Comments
 (0)