Skip to content
Advertisement

Laravel query join on not null

I have the following query join in MySQL.

I tried to convert to laravel query builder like this:

But it shows the error unknown column '' on clouse. Please help. Thanks!

Advertisement

Answer

->on method arguments are columns and operators, You cant pass where condition in it.

You can use this:

Hope this helps you

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