-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add reminders/upcoming
API
#5783
Conversation
public function upcoming(Request $request, int $month = 0) | ||
{ | ||
try { | ||
$reminders = AccountHelper::getUpcomingRemindersForMonth( | ||
auth()->user()->account, | ||
$month | ||
)->pluck('reminder'); | ||
} catch (QueryException $e) { | ||
return $this->respondInvalidQuery(); | ||
} | ||
|
||
return ReminderResource::collection($reminders); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking about copy content of AccountHelper::getUpcomingRemindersForMonth()
to here,
and replace ->get()
with ->pagination()
.
But it's more complicated, and ?limit=xxx
not work correctly as I expected.
So I create simple PR like this, get all upcoming event in target month.
If anyone have better idea, feel free to tell me.
5fd0b0e
to
b36da13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @nhymxu this is great.
See my comment.
b36da13
to
ca9e9ce
Compare
@asbiin About your comment, please consider my idea. Thank you |
🎉 This PR is included in version 3.6.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This pull request has been automatically locked since there |
Close #5778
Docs close monicahq/marketing_site#642
General checks
Backend/models changes
Usage
current month
or
next month
(month+1
)next n month
(month+n
)