whereNotIn not working

Posted 4 months ago by screwtape_mk

Hi - i have the following query regarding the field Payment_Status which has either a 'completed' or 'error' :

I want to exclude the error payment statuses

When i apply the where clause as below it works..

$bookings=Auth::user()->bookings->where('Payment_Status','completed');

but when i apply the filter i really want to apply:

$bookings=Auth::user()->bookings->whereNotIn('Payment_Status','error');

I get the error:

Call to undefined method Illuminate\Database\Eloquent\Collection::whereNotIn()

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.