@@ -1078,43 +1078,43 @@ public function orderBy(array|Raw|string $columns, string $order = 'ASC'): stati
10781078 }
10791079
10801080 /**
1081- * Adds a raw ORDER BY clause.
1081+ * Adds an ascending ORDER BY clause.
10821082 *
10831083 * @return $this
10841084 */
1085- public function orderByRaw ( string $ raw , array $ parameters = [], string $ order = ' ASC ' ): static
1085+ public function ascending ( array | string $ columns ): static
10861086 {
1087- return $ this ->orderBy (new Raw ( $ raw , $ parameters ), $ order );
1087+ return $ this ->orderBy ($ columns , ' ASC ' );
10881088 }
10891089
10901090 /**
1091- * Adds an ascending ORDER BY clause.
1091+ * Adds a descending ORDER BY clause.
10921092 *
10931093 * @return $this
10941094 */
1095- public function ascending (array |string $ columns ): static
1095+ public function descending (array |string $ columns ): static
10961096 {
1097- return $ this ->orderBy ($ columns , 'ASC ' );
1097+ return $ this ->orderBy ($ columns , 'DESC ' );
10981098 }
10991099
11001100 /**
1101- * Adds a raw ascending ORDER BY clause.
1101+ * Adds a raw ORDER BY clause.
11021102 *
11031103 * @return $this
11041104 */
1105- public function ascendingRaw (string $ raw , array $ parameters = []): static
1105+ public function orderByRaw (string $ raw , array $ parameters = [], string $ order = ' ASC ' ): static
11061106 {
1107- return $ this ->orderByRaw ( $ raw , $ parameters, ' ASC ' );
1107+ return $ this ->orderBy ( new Raw ( $ raw , $ parameters), $ order );
11081108 }
11091109
11101110 /**
1111- * Adds a descending ORDER BY clause.
1111+ * Adds a raw ascending ORDER BY clause.
11121112 *
11131113 * @return $this
11141114 */
1115- public function descending ( array | string $ columns ): static
1115+ public function ascendingRaw ( string $ raw , array $ parameters = [] ): static
11161116 {
1117- return $ this ->orderBy ( $ columns , ' DESC ' );
1117+ return $ this ->orderByRaw ( $ raw , $ parameters , ' ASC ' );
11181118 }
11191119
11201120 /**
0 commit comments