Throw an exception when Laravel Builder::orderBy() is used with invalid order

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Laravel
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Laravel Eloquent Query Builder throws an exception when the orderBy method is used with an incorrect $direction value.

      https://github.com/laravel/framework/blob/v10.15.0/src/Illuminate/Database/Query/Builder.php#L2314-L2316

      Add the same exception to laravel-mongodb, but allow (1, -1) and (asc, desc )

       

              Assignee:
              Jérôme Tamarelle
              Reporter:
              Jérôme Tamarelle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: