phpvms/app/Events/UserStatsChanged.php
Nabeel S e99c22b007
Notifications fixes (#804)
* Emails not sending #795 #722

* Fix for news items not being sent; refactor some events; check for opt-in #722

* Formatting

* Remove extra parameter
2020-09-03 12:50:42 -04:00

27 lines
504 B
PHP

<?php
namespace App\Events;
use App\Contracts\Event;
use App\Models\User;
class UserStatsChanged extends Event
{
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;
}
}