Skip to content
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

Push without user #187

Open
bilogic opened this issue Mar 12, 2023 · 1 comment
Open

Push without user #187

bilogic opened this issue Mar 12, 2023 · 1 comment

Comments

@bilogic
Copy link

bilogic commented Mar 12, 2023

As I understand it, the web push standard only requires the endpoint as an identifier, so it seems a bit restrictive that a user account is required in order to push.

Would be great if we can push without $user by allowing subscribable_type and subscribable_id to be nullable.
Of course, more code would be required to push directly.

Thank you.

@joshuasanjuan1717
Copy link

Hi, I solved this issue by using firstOrFail()
$notif = Notif::where('id', 2)->firstOrFail();
$notif->updatePushSubscription($endpoint, $key, $token);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants