Skip to content

Commit

Permalink
Create user statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
cholladay0816 committed Dec 21, 2023
1 parent f5710ab commit 7982d56
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
use App\Listeners\Commission\Notification\SendCommissionArchivedNotification;
use App\Listeners\Commission\Notification\SendCommissionCompletedNotification;
use App\Listeners\Commission\Notification\SendCommissionCreatedNotification;
use App\Listeners\Commission\SetLastCommissionAtStatistic;
use App\Listeners\CommissionMessage\ReceivedNotification;
use App\Listeners\Review\UpdateUserRatingStatistic;
use App\Listeners\User\SetLastLoginAtStatistic;
use Illuminate\Auth\Events\Login;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
Expand All @@ -30,6 +34,11 @@ class EventServiceProvider extends ServiceProvider
Registered::class => [
SendEmailVerificationNotification::class,
],
// User login
Login::class => [
SetLastLoginAtStatistic::class,
],

// Commission
Created::class => [
// @todo: add normal logic
Expand All @@ -51,6 +60,7 @@ class EventServiceProvider extends ServiceProvider
// @todo: add normal logic
// @todo: move email here
SendCommissionAcceptedNotification::class,
SetLastCommissionAtStatistic::class,
],
// Commission Message Received
Send::class => [
Expand All @@ -61,6 +71,15 @@ class EventServiceProvider extends ServiceProvider
\App\Listeners\Ticket\Submitted\Email::class,
],

// Review created
\App\Events\Review\Created::class => [
UpdateUserRatingStatistic::class
],
// Review Updated
\App\Events\Review\Updated::class => [
UpdateUserRatingStatistic::class
],

/* @todo:
*
* Disputed
Expand Down

0 comments on commit 7982d56

Please sign in to comment.