-
Notifications
You must be signed in to change notification settings - Fork 88
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
v3 Roadmap [Suggestions Wanted] #126
Comments
Hey this package is great but I'd love to see an implementation of a method like For example, consider a // In your controller
$project->completed_at = now();
// Then somewhere inside an observer or whatever
public function wasCompleted(Project $project): ScheduledNotification
{
$user = $project->owner;
// Send the reminder immediately
$user->notify(new InvoiceTheClientReminder($project));
// Also send reminders every two days
return $user->notifyAtInterval(
new InvoiceTheClientReminder($project),
CarbonInterval::days(2),
fn(Project $project) => !is_null($project->invoiced_at) // A closure to determine when it should stop sending
);
} Under the hood I imagine this could make use of Thanks for considering this! |
A backoff configuration or if someone has an invalid email and the SMTP service fails as an example, it doesn't reattempt it very minute or someway to handle cancelling a notification if an exception is thrown.
Maybe a max attempts too. Or just an event when a notification throws an error. |
A way to defer who the message gets sent to until the time of sending perhaps? Currently, the way we are using it, we are identifying a bunch of users by Role to send the message to. But if those users have been soft deleted at the time the message is sent, they still get the notification (as they have been serialised at the point the notification was scheduled?). |
Is there anything people suggest for v3? Happy to make BC breaks if required, as long as there is a path for migration for existing users.
Strict types will be the main one.
cc @thomasjohnkane
The text was updated successfully, but these errors were encountered: