Skip to content

Comments

Allow custom notification class for people who would like to use othe…#18

Merged
afsakar merged 1 commit intoafsakar:mainfrom
osenco:main
May 28, 2025
Merged

Allow custom notification class for people who would like to use othe…#18
afsakar merged 1 commit intoafsakar:mainfrom
osenco:main

Conversation

@maukoese
Copy link
Contributor

@maukoese maukoese commented May 7, 2025

I'd like to use SMS to send out the notifications, because some of my users don't have email addresses. I feel like it would help a lot for myself and other devs to be able to customize the notification class being used; to add their channels of choice, besides just email.

While in my case I'm doing SMS, any other channel including Whatsapp, Telegram of FCM can be used to send the OTP

@afsakar
Copy link
Owner

afsakar commented May 12, 2025

Thank you for your PR. 🤝 I will check asap.

@maukoese
Copy link
Contributor Author

Looking forward to your feedback, and hopefully, merging.

@maukoese
Copy link
Contributor Author

Hello. Any feedback on this?

@afsakar afsakar merged commit b49b705 into afsakar:main May 28, 2025
1 check passed
@maukoese
Copy link
Contributor Author

@afsakar just realized something in the migration:

//... other columns
$table->string('email'); <--- this one
//... other columns

What if we replaced the email column and/or added a user_id columns with would be easier to work with if the record doesn't have an email?

We could use the foreignIdFor() helper which works for strings(uuid, ulid) as well as integers.

So something like:

$table->foreignIdFor(\App\Models\User::class);

We can even go further and add the user model to config so people can use other models if they wish

Something like:

$table->foreignIdFor(config('filament-otp-login.user_model', \App\Models\User::class));

@afsakar
Copy link
Owner

afsakar commented May 28, 2025

I don't have any plans at the moment, but I'm thinking of implementing these after v4 is released. But thank you anyway 🙏

@maukoese
Copy link
Contributor Author

Alright, thank you so much.

I'm avaiable if you need any help with the implmentation and support.

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

Successfully merging this pull request may close these issues.

2 participants