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

Time:08-09

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.

CodePudding user response:

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

  • Related