Laravel and MongoDB Experts

Job ID: 31274127

Budget: ₹400 – ₹750 INR

Hi all,

I need quick help to convert some of the mysql query to MongoDB. My application running in Laravel.

Quick project and good money if you are expert. if you can spend 15 mins via remote you can fix the issue. But i will pay for 1 hour.

I need your help with multiple query Please find below example:

MySql Query
$getOrder = Order::with('items.product.category', 'items.quantities.product_unit', 'shopper', 'customer', 'location', 'order_track', 'agent')->where(['shopper_id' => $authID, 'draft' => 0])->whereDate('created_at', Carbon::today())->whereNotIn('status', [2,3])->get()->sortBy('items.product.category_id')->sortBy('items.product.sub_category_id');

When the same query from MongoDB i am getting following error

{message: "Call to undefined method Jenssegers\Mongodb\Query\Builder::compileWhereDate()",…}
exception: "BadMethodCallException"
file: "/var/www/html/yes-backend-mongodb/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php"
line: 50
message: "Call to undefined method Jenssegers\\Mongodb\\Query\\Builder::compileWhereDate()"

MongoDB
created_at:2021-08-24T10:27:16.398+00:00

I think this is date format issue.

Happy biding
Related categories: PHP MySQL Laravel MongoDB