laravel controller not returning data but the condition in the where clause is true?

57 views Asked by At

I am using laravel 9x. I made the condition where(email,'Auth::user()->email)->where('active','!=',3)->get();

there is a lot of data where active is not equal to 3 but still, it's not returning any data.

1

There are 1 answers

0
shaho1090 On BEST ANSWER

When you want to use not equal in the builder you should use '<>' instead of '!=';