mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 21:34:03 +00:00
598 B
598 B
| title | tweet_id | thread_slug | author_username | images | created_at | slug | |
|---|---|---|---|---|---|---|---|
| Yesterday in my @LaraconOnline talk I explained how to use the query builder when() method to handle complex sorting | 1233017064492761088 | 1-rt-1-tip | reinink |
|
2021-04-06T16:07:49+00:00 | yesterday-in-my-at-laracononline-talk-i-explained-how-to-use-the-query-builder-when-method-to-handle-complex-sorting |
What you may not realize is that the when() method also accepts a second callback for the falsy case. This is really helpful for setting a sort default. 🤩