Jrod730
698
5
Laravel

orderBy Not Working Correctly

Posted 1 year ago by Jrod730

I am using query builder to sort dates by asc and desc order. But, for some reason the oderBy function only "kinda" sorts the dates in correct order. Why is this?

    if ($objRequest->query('order_by')) {

        $objQuery->orderBy($objRequest->query('order_by'), $objRequest->query('dir'));

        
    }

Results: https://imgur.com/rp7WGTD https://imgur.com/s7hhXq4

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