Add notification preferences and admin governance
This commit is contained in:
@@ -27,6 +27,12 @@ class ExchangeEventNotification extends Notification
|
||||
*/
|
||||
public function via(object $notifiable): array
|
||||
{
|
||||
$preferences = $notifiable->notificationPreference()->firstOrCreate([]);
|
||||
|
||||
if (! $preferences->allows($this->type, 'database')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return ['database'];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user