Replies: 1 comment 1 reply
-
You can make a builder macro |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In Ruby on Rails, you can easily do
User.last
to get the last user object.In Laravel, I see there is a "latest" method which adds an orderBy clause, but no "last", so you would have to do
User::latest()->first()
.I propose a new method is added to the query builder called "last" which will do
->latest()->first()
.Beta Was this translation helpful? Give feedback.
All reactions