multiple parameters with orWhere

orWhere() inside you can pass an array of parameters .

“Usual” way:

$q->where('x', 1);
$q->orWhere('y', 2);
$q->orWhere('z', 3);

You can do it like this:

$q->where('x', 1);
$q->orWhere(['y' => 2, 'z' => 3]);

No comments:

Post a Comment

Other post

1) The create() Method The  create()  method is a powerful and convenient way to store data in your Laravel application. It is typically use...