added SubscriptionWasCreatedNotification

This commit is contained in:
Čarodej
2022-03-16 11:08:57 +01:00
parent 9a6abbd6e8
commit bc197cbb5e
3 changed files with 57 additions and 1 deletions
@@ -3,6 +3,7 @@
namespace Support\Listeners;
use Domain\Subscriptions\Notifications\BillingAlertTriggeredNotification;
use Domain\Subscriptions\Notifications\SubscriptionWasCreatedNotification;
use Illuminate\Events\Dispatcher;
use VueFileManager\Subscription\Support\Events\BillingAlertTriggeredEvent;
use VueFileManager\Subscription\Support\Events\SubscriptionWasCreated;
@@ -17,6 +18,8 @@ class SubscriptionEventSubscriber
'max_storage_amount' => $event->subscription->fixedFeature('max_storage_amount'),
'max_team_members' => $event->subscription->fixedFeature('max_team_members'),
]);
$event->subscription->user->notify(new SubscriptionWasCreatedNotification($event->subscription));
}
public function handleSubscriptionWasUpdated($event)