You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update docs with information about the whereLike query (#9765)
* Update docs with information about the whereLike query
* Update queries.md
* Update queries.md
---------
Co-authored-by: Taylor Otwell <taylor@laravel.com>
The `whereBetween` method verifies that a column's value is between two values:
588
+
The `whereLike` method allows you to add "LIKE" clauses to your query for pattern matching. These methods provide a database-agnostic way of performing string matching queries, with the ability to toggle case-sensitivity. By default, string matching is case-insensitive:
589
589
590
590
$users = DB::table('users')
591
-
->whereBetween('votes', [1, 100])
591
+
->whereLike('name', '%John%')
592
592
->get();
593
593
594
-
**whereNotBetween / orWhereNotBetween**
594
+
You can enable a case-sensitive search via the `caseSensitive` argument:
595
595
596
-
The `whereNotBetween` method verifies that a column's value lies outside of two values:
@@ -648,6 +655,36 @@ select * from comments where user_id in (
648
655
> [!WARNING]
649
656
> If you are adding a large array of integer bindings to your query, the `whereIntegerInRaw` or `whereIntegerNotInRaw` methods may be used to greatly reduce your memory usage.
650
657
658
+
**whereBetween / orWhereBetween**
659
+
660
+
The `whereBetween` method verifies that a column's value is between two values:
661
+
662
+
$users = DB::table('users')
663
+
->whereBetween('votes', [1, 100])
664
+
->get();
665
+
666
+
**whereNotBetween / orWhereNotBetween**
667
+
668
+
The `whereNotBetween` method verifies that a column's value lies outside of two values:
0 commit comments