Skip to content

Instantly share code, notes, and snippets.

@ianfagg
Created August 8, 2017 11:10
Show Gist options
  • Save ianfagg/d2f48a827d86cfa3690d14ffb1d4e3f5 to your computer and use it in GitHub Desktop.
Save ianfagg/d2f48a827d86cfa3690d14ffb1d4e3f5 to your computer and use it in GitHub Desktop.
Spark user verification
<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
// User Related Events...
'Laravel\Spark\Events\Auth\UserRegistered' => [
'Laravel\Spark\Listeners\Subscription\CreateTrialEndingNotification',
],
'Laravel\Spark\Events\Subscription\UserSubscribed' => [
'Laravel\Spark\Listeners\Subscription\UpdateActiveSubscription',
'Laravel\Spark\Listeners\Subscription\UpdateTrialEndingDate',
],
'Laravel\Spark\Events\Profile\ContactInformationUpdated' => [
'Laravel\Spark\Listeners\Profile\UpdateContactInformationOnStripe',
],
'Laravel\Spark\Events\PaymentMethod\VatIdUpdated' => [
'Laravel\Spark\Listeners\Subscription\UpdateTaxPercentageOnStripe',
],
'Laravel\Spark\Events\PaymentMethod\BillingAddressUpdated' => [
'Laravel\Spark\Listeners\Subscription\UpdateTaxPercentageOnStripe',
],
'Laravel\Spark\Events\Subscription\SubscriptionUpdated' => [
'Laravel\Spark\Listeners\Subscription\UpdateActiveSubscription',
],
'Laravel\Spark\Events\Subscription\SubscriptionCancelled' => [
'Laravel\Spark\Listeners\Subscription\UpdateActiveSubscription',
],
// Team Related Events...
'Laravel\Spark\Events\Teams\TeamCreated' => [
'Laravel\Spark\Listeners\Teams\Subscription\CreateTrialEndingNotification',
],
'Laravel\Spark\Events\Teams\Subscription\TeamSubscribed' => [
'Laravel\Spark\Listeners\Teams\Subscription\UpdateActiveSubscription',
'Laravel\Spark\Listeners\Teams\Subscription\UpdateTrialEndingDate',
],
'Laravel\Spark\Events\Teams\Subscription\SubscriptionUpdated' => [
'Laravel\Spark\Listeners\Teams\Subscription\UpdateActiveSubscription',
],
'Laravel\Spark\Events\Teams\Subscription\SubscriptionCancelled' => [
'Laravel\Spark\Listeners\Teams\Subscription\UpdateActiveSubscription',
],
'Laravel\Spark\Events\Teams\UserInvitedToTeam' => [
'Laravel\Spark\Listeners\Teams\CreateInvitationNotification',
],
// User Verification Events...
'Jrean\UserVerification\Events\VerificationEmailSent' => [
'App\Listeners\AlertVerificationEmailSent',
],
'Jrean\UserVerification\Events\UserVerified' => [
'App\Listeners\AlertUserVerified',
],
];
/**
* Register any other events for your application.
*
* @return void
*/
public function boot()
{
parent::boot();
//
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment