Skip to content
Advertisement

Eloquent Laravel multiple like where and where clause

I have the below Mysql query that works.

mysql:

JavaScript

This works and i get the data that I expected but I am trying to write that in Laravel query builder but its not picking up the last and al.isOfficeClose = 0. is there anything you all can catch and see that I am doing wrong?

Laravel:

JavaScript

Advertisement

Answer

You can define a function for where clause, like this:

JavaScript

By the way,

JavaScript

is different than (mind the parenthesis)

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement