Skip to content

Instantly share code, notes, and snippets.

@HeadStudios
Created January 18, 2023 22:18
Show Gist options
  • Save HeadStudios/6165ceb6d06e5513e44d98e72f19b8a9 to your computer and use it in GitHub Desktop.
Save HeadStudios/6165ceb6d06e5513e44d98e72f19b8a9 to your computer and use it in GitHub Desktop.
<?php
namespace App\Providers;
use App\Events\CourseAttachedToUser;
use App\Listeners\EmailUserAboutCourseAttach;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Events\ShortURLVisited;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Auth\Listeners\PhoneMessageLinkClicked;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
use App\Models\Opps;
class EventServiceProvider extends ServiceProvider
{
/**
* The event to listener mappings for the application.
*
* @var array<class-string, array<int, class-string>>
*/
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
ShortURLVisited::class => [
PhoneMessageLinkClicked::class,
],
'Illuminate\Auth\Events\Login' => [
'App\Listeners\CheckStripeTag',
],
CourseAttachedToUser::class => [
EmailUserAboutCourseAttach::class,
],
];
/**
* Register any events for your application.
*
* @return void
*/
public function boot()
{
}
/**
* Determine if events and listeners should be automatically discovered.
*
* @return bool
*/
public function shouldDiscoverEvents()
{
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment