2017-12-23 06:32:21 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Events;
|
|
|
|
|
|
|
|
use App\Models\User;
|
|
|
|
|
2019-11-20 23:16:01 +08:00
|
|
|
class UserStatsChanged extends BaseEvent
|
2017-12-23 06:32:21 +08:00
|
|
|
{
|
2018-08-27 00:40:04 +08:00
|
|
|
public $stat_name;
|
|
|
|
public $old_value;
|
|
|
|
public $user;
|
2017-12-23 06:32:21 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* When a user's stats change. Stats changed match the field name:
|
2019-11-20 23:16:01 +08:00
|
|
|
* airport
|
|
|
|
* flights
|
|
|
|
* rank
|
2017-12-23 06:32:21 +08:00
|
|
|
*/
|
|
|
|
public function __construct(User $user, $stat_name, $old_value)
|
|
|
|
{
|
|
|
|
$this->user = $user;
|
|
|
|
$this->stat_name = $stat_name;
|
|
|
|
$this->old_value = $old_value;
|
|
|
|
}
|
|
|
|
}
|