Home > Article > Backend Development > laravel框架的orderBy问题
laravel的 orderBy('a','desc'),我如果还想在a一样的情况下,同时根据b降序排序要怎么写
orderBy 方法(Builder.php)被写作
public function orderBy($column, $direction = 'asc') { $this->orders[] = compact('column', 'direction'); return $this; }
orderBy 方法(Builder.php)被写作
public function orderBy($column, $direction = 'asc') { $this->orders[] = compact('column', 'direction'); return $this; }
orderBy 方法(Builder.php)被写作
public function orderBy($column, $direction = 'asc') { $this->orders[] = compact('column', 'direction'); return $this; }