Solved - Laravel where not equal null Value has issue

Jan 12, 2022 . Admin

Hello Friends,

This article will give you example of where null and where not null eloquent query example laravel. how do you check if not null with eloquent in laravel. I explained simply about laravel not equal to null code. This tutorial will give you simple example of laravel eloquent or where is not null.

In this post, You'll learn where value is not equal to. i will show you use of laravel where clause not working for null values

Here i will give you many example for laravel where not equal to null code value.

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