Solved - Laravel where not equal null Value has issue

10-Apr-2023

.

Admin

Hello Friends,

This article will give you example of laravel where clause not working for null values. I explained simply about laravel eloquent or where is not null. This tutorial will give you simple example of laravel not equal to null code.

In this post, You'll learn where value is not equal to. i will show you use of where null and where not null eloquent query example laravel.

Here i will give you many example for laravel where clause not working for null values.

So let's see bellow solution:

Solution:


Product::select("*")

->where(function ($query) {

$query->where('status', '!=', 1)

->orWhereNull('status')

})

->get();

I hope it will help you...

#Laravel