Event listener that I am trying to perform the same action for 3 different Laravel Spark Next events. Only the SubscriptionCreated seems to be triggered.
namespace App\Listeners;
use Spark\Events\SubscriptionCreated;
use Spark\Events\SubscriptionUpdated;
use Spark\Events\SubscriptionCancelled;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
class SparkSubscriptionUpdate
{
public function handle($event)
{
//do something;
}
public function subscribe($events)
{
return [
SubscriptionCreated::class => 'handle',
SubscriptionUpdated::class => 'handle',
SubscriptionCancelled::class => 'handle',
];
}
}
Can someone tell me if I am missing something? Haven't been able to find any examples on the internet that this wouldn't work.