Open imacrayon opened 11 months ago
Hi! Is someone working on this?
Hi! Sorry for the delay.
Is this ok in the profile update page?
Awesome, that looks great!
It is ok to have a Configuration Model with id, value, user_id
to manage different configuration options in the future?
Sure, I think that’s fine. I wouldn’t be opposed to using a JSON column either. Whatever you prefer is cool.
A JSON column sounds good, so it will be something like user_id, value(json)
Sorry, I meant a JSON column on the users
table called settings
or something. Instead of making a whole new table. If you’ve got a lot of ideas for setting though, maybe a separate table would be the way to go?
I'm going for a settings column in users :)
Everything working except the notification test
Cannot change the settings value for the $viewer
I would double check that you have WishCreatedNotification
imported in your test, sometimes I forget to do that. If that's not the cause try doing:
Notification::assertNotSentTo($viewer, WishCreatedNotification::class);
See if that passes. I've has issues with using a closure with assertNotSentTo
in the past.
Line 29 in WishController
is kind of hard to follow. It might be easier to read if you used filter
instead of reject
:
Notification::send($withlist->viewers->filter(fn ($viewer) => $viewer->settings['notification']['wish-created']), ...);
Ok, let's fix that
The app now sends emails when wishes are added to a wishlist and when comments are posted to a wishlist. There should probably be an area where users can customize what kinds of email notifications they want to receive.