mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-30 03:25:59 +00:00
receive events from subscription package
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Support\Listeners\SubscriptionEventSubscriber;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
@@ -19,6 +19,15 @@ class EventServiceProvider extends ServiceProvider
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* The subscriber classes to register.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $subscribe = [
|
||||
SubscriptionEventSubscriber::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Support\Listeners;
|
||||
|
||||
use Illuminate\Events\Dispatcher;
|
||||
use VueFileManager\Subscription\Support\Events\SubscriptionWasCreated;
|
||||
|
||||
class SubscriptionEventSubscriber
|
||||
{
|
||||
public function handleSubscriptionWasCreated($event) {
|
||||
// TODO: set new storage size by subscribed plan
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the listeners for the subscriber.
|
||||
*/
|
||||
public function subscribe(Dispatcher $events): array
|
||||
{
|
||||
return [
|
||||
SubscriptionWasCreated::class => 'handleSubscriptionWasCreated',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user