phpvms/app/Events/UserStatsChanged.php
Nabeel S ea3ab21beb
391 Notification refactorings (#441)
* Refactor notifications to allow easier plugins

* Notification refactoring

* Formatting

* Move news to NewsService; cleanup of events

* More refactoring; added send email out for news item and the template

* Formatting

* Formatting
2019-11-20 10:16:01 -05:00

26 lines
483 B
PHP

<?php
namespace App\Events;
use App\Models\User;
class UserStatsChanged extends BaseEvent
{
public $stat_name;
public $old_value;
public $user;
/*
* When a user's stats change. Stats changed match the field name:
* airport
* flights
* rank
*/
public function __construct(User $user, $stat_name, $old_value)
{
$this->user = $user;
$this->stat_name = $stat_name;
$this->old_value = $old_value;
}
}