laravel-mongodb icon indicating copy to clipboard operation
laravel-mongodb copied to clipboard

Cannot change ordering of query

Open nicolasvahidzein opened this issue 3 years ago • 1 comments

Hello I cannot change the order in which my results are ordered and this is very important. changes asc to desc and vice versa does not affect the query at all.

		//grab all of the user's orders
		$tempOrderslist = Orders::query()
		->where('userUID', '=', $user->UID)
		->orderBy('orderDate', 'asc');//'desc' or 'asc' THIS CHANGES NOTHING
		->take(40)
		->get();

nicolasvahidzein avatar May 15 '22 14:05 nicolasvahidzein

orderDate is formatted as follows: 2022-05-13T09:01:44.076+00:00

nicolasvahidzein avatar May 15 '22 15:05 nicolasvahidzein