If you need a writing method unique to a certain database, or are not used to Eloquent's method, you can also use native SQL statements (not recommended, especially since it is easy to cause SQL injection vulnerabilities due to spelling strings) - use DB: :raw method.
It seems that you can use the where statement.
If you need a writing method unique to a certain database, or are not used to Eloquent's method, you can also use native SQL statements (not recommended, especially since it is easy to cause SQL injection vulnerabilities due to spelling strings) - use DB: :raw method.
I just moved it from the documentation. . .
I recommend you an elegant writing method, which is similar to TP. Please look here
Then you can write
$map = ['aa' => ['LIKE' => '%XXX%' ];