Skip to content

Commit c205dfd

Browse files
Document associative array where clauses (#10583)
* Document associative array where clauses * Update queries.md --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 4bb1622 commit c205dfd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

queries.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,15 @@ For convenience, if you want to verify that a column is `=` to a given value, yo
522522
$users = DB::table('users')->where('votes', 100)->get();
523523
```
524524

525+
You may also provide an associative array to the `where` method to quickly query against multiple columns:
526+
527+
```php
528+
$users = DB::table('users')->where([
529+
'first_name' => 'Jane',
530+
'last_name' => 'Doe',
531+
])->get();
532+
```
533+
525534
As previously mentioned, you may use any operator that is supported by your database system:
526535

527536
```php

0 commit comments

Comments
 (0)