Cashier remove the ->orderBy('created_at', 'desc') from ManagesSubscriptions > subscriptions() #55523
Replies: 1 comment
-
just discovered |
Beta Was this translation helpful? Give feedback.
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
i find that it's pretty boring that when querying the
subscriptions
, there 's anorderBy
automatically added to it.This is not convenient when you set a subscription to take place in the future. as the mentioned query will always return the future subscription first, instead on the current ongoing one.
if
->orderBy('created_at', 'desc')
get removed, that would allow us to do something like$user->subscription()->orderBy('ends_at')
to get the current subscription in first.i know there's many way to solve this issue, but i think that would be better, by default, to let the dev decide what to get when calling the relationship to be more adaptable to different situations & avoiding extra useless development.
Beta Was this translation helpful? Give feedback.
All reactions