diff --git a/queries.md b/queries.md index ada48ca3309..6d56ffb1ab0 100644 --- a/queries.md +++ b/queries.md @@ -216,6 +216,8 @@ The `whereRaw` and `orWhereRaw` methods can be used to inject a raw `where` clau ->whereRaw('price > IF(state = "TX", ?, 100)', [200]) ->get(); +> {note} `whereRaw` with OR clause cannot use [`SoftDeletes`](/docs/{{version}}/eloquent#soft-deleting) trait safely. If you use OR clause in `whereRaw`, you should be either using SQL Parentheses in `whereRaw` or using `orWhere` instead of `whereRaw`. + #### `havingRaw / orHavingRaw`