Files
nexusphp/app/Providers/EventServiceProvider.php

72 lines
2.1 KiB
PHP
Raw Normal View History

2021-04-02 19:48:41 +08:00
<?php
namespace App\Providers;
2022-07-30 15:06:51 +08:00
use App\Events\SeedBoxRecordUpdated;
use App\Events\TorrentCreated;
2024-04-26 03:21:35 +08:00
use App\Events\TorrentDeleted;
2022-03-26 04:27:04 +08:00
use App\Events\TorrentUpdated;
2025-04-17 01:39:40 +07:00
use App\Events\UserDeleted;
use App\Events\UserDisabled;
2025-07-21 20:55:30 +07:00
use App\Listeners\ClearTorrentCache;
2024-04-26 03:21:35 +08:00
use App\Listeners\DeductUserBonusWhenTorrentDeleted;
use App\Listeners\FetchTorrentImdb;
2025-05-16 02:43:45 +07:00
use App\Listeners\FetchTorrentPTGen;
use App\Listeners\RemoveOauthTokens;
2022-07-30 15:06:51 +08:00
use App\Listeners\RemoveSeedBoxRecordCache;
2025-04-17 01:39:40 +07:00
use App\Listeners\SendEmailNotificationWhenTorrentCreated;
use App\Listeners\SyncTorrentToElasticsearch;
use App\Listeners\SyncTorrentToMeilisearch;
2024-04-26 03:21:35 +08:00
use App\Listeners\TestTorrentUpdated;
2021-04-02 19:48:41 +08:00
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
2022-07-30 15:06:51 +08:00
SeedBoxRecordUpdated::class => [
RemoveSeedBoxRecordCache::class,
],
2024-04-26 03:21:35 +08:00
TorrentUpdated::class => [
2025-05-16 03:34:39 +07:00
FetchTorrentImdb::class,
FetchTorrentPTGen::class,
2025-04-17 01:39:40 +07:00
SyncTorrentToElasticsearch::class,
SyncTorrentToMeilisearch::class,
2024-04-26 03:21:35 +08:00
],
TorrentCreated::class => [
FetchTorrentImdb::class,
2025-05-16 02:43:45 +07:00
FetchTorrentPTGen::class,
2025-04-17 01:39:40 +07:00
SyncTorrentToElasticsearch::class,
SyncTorrentToMeilisearch::class,
SendEmailNotificationWhenTorrentCreated::class,
2025-07-21 20:55:30 +07:00
ClearTorrentCache::class,
],
2024-04-26 03:21:35 +08:00
TorrentDeleted::class => [
DeductUserBonusWhenTorrentDeleted::class,
],
UserDisabled::class => [
RemoveOauthTokens::class,
],
2021-04-02 19:48:41 +08:00
];
/**
* Register any events for your application.
*
* @return void
*/
public function boot()
{
//
}
}