Wednesday, March 15, 2017

How can I use JSON Where Clauses on laravel mongodb? (Laravel 5.3)

My data on mongodb compass is like this :

enter image description here

I read from here : https://laravel.com/docs/5.3/queries#json-where-clauses

I try to implement json where clauses like this :

Message::where('information->seller_id', 1)
       ->get();

The results are not showing. Whereas the data exist

This query seems still wrong

I try read reference here : https://github.com/jenssegers/laravel-mongodb

But, I don't find it

How can I solve this problem?



via moses toh

Advertisement