Repository navigation
[5.4] Add orderByDesc() to Query Builder - #18292
Conversation
|
👍 |
|
So I'm on the fence about this... If we introduce Then I think, maybe a magic method, that does like Thoughts? |
|
I don't think so.
|
|
actually Laravel already provide |
|
orderByDesc() is more rememberable than latest()... |
| public function orderByDesc($column) | ||
| { | ||
| $this->orderBy($column, 'desc'); | ||
|
|
There was a problem hiding this comment.
Why not just use
public function orderByDesc($column)
{
return $this->orderBy($column, 'desc');
}There was a problem hiding this comment.
Here you go @CupOfTea696 #18465
Thanks. 😄
Just a shortcut of something that I use a lot.