phpvms/app/Events/UserStateChanged.php

26 lines
523 B
PHP
Raw Normal View History

2017-12-03 00:55:17 +08:00
<?php
namespace App\Events;
use App\Models\User;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
/**
* Event triggered when a user's state changes
* @package App\Events
*/
2017-12-03 00:55:17 +08:00
class UserStateChanged
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $old_state, $user;
2017-12-03 00:55:17 +08:00
public function __construct(User $user, $old_state)
2017-12-03 00:55:17 +08:00
{
$this->old_state = $old_state;
2017-12-03 00:55:17 +08:00
$this->user = $user;
}
}