Wednesday, March 15, 2017

How can I use "not like" on laravel mongodb?

I see here : https://github.com/jenssegers/laravel-mongodb

I try :

$user = Comment::where('body', 'like', '%spam%')->get();

It works

But when I try :

$user = Comment::where('body', 'not like', '%spam%')->get();

It does not work

Seems the library not support not like

Whether there are any people who know how to circumvent this?



via samuel toh

Advertisement