56 lines
1.3 KiB
PHP
56 lines
1.3 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Events;
|
||
|
|
|
||
|
|
use App\Models\Claim;
|
||
|
|
use App\Models\User;
|
||
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
||
|
|
use Illuminate\Queue\SerializesModels;
|
||
|
|
|
||
|
|
class ClaimModelChanged
|
||
|
|
{
|
||
|
|
use Dispatchable;
|
||
|
|
use InteractsWithSockets;
|
||
|
|
use SerializesModels;
|
||
|
|
|
||
|
|
/** @var \App\Models\Claim $claim Current claim modified. */
|
||
|
|
public $claim;
|
||
|
|
|
||
|
|
/** @var string $field Modified field. */
|
||
|
|
public $field;
|
||
|
|
|
||
|
|
/** @var string $label Label of the modified field. */
|
||
|
|
public $label;
|
||
|
|
|
||
|
|
/** @var \App\Models\User|null $user Current authenticated user. */
|
||
|
|
public $user;
|
||
|
|
|
||
|
|
/** @var string|null $content Custom content message. */
|
||
|
|
public $content;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Create a new event instance.
|
||
|
|
*
|
||
|
|
* @param \App\Models\Claim $claim
|
||
|
|
* @param string $field
|
||
|
|
* @param string $label
|
||
|
|
* @param \App\Models\User|null $user
|
||
|
|
* @param string|null $content
|
||
|
|
* @return void
|
||
|
|
*/
|
||
|
|
public function __construct(
|
||
|
|
Claim $claim,
|
||
|
|
string $field,
|
||
|
|
string $label,
|
||
|
|
User|null $user = null,
|
||
|
|
string|null $content = null,
|
||
|
|
) {
|
||
|
|
$this->claim = $claim;
|
||
|
|
$this->field = $field;
|
||
|
|
$this->label = $label;
|
||
|
|
$this->user = $user;
|
||
|
|
$this->content = $content;
|
||
|
|
}
|
||
|
|
}
|