33 lines
817 B
PHP
33 lines
817 B
PHP
<?php
|
|
|
|
namespace App\Events;
|
|
|
|
use App\Enums\NotificationType;
|
|
use App\Interfaces\Notifiable;
|
|
use App\Models\Customer;
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class NewNotification
|
|
{
|
|
use Dispatchable;
|
|
use InteractsWithSockets;
|
|
use SerializesModels;
|
|
|
|
/**
|
|
* Create a new event instance.
|
|
*
|
|
* @param \App\Enums\NotificationType $type
|
|
* @param string $content
|
|
* @param \App\Interfaces\Notifiable $model
|
|
* @param \App\Models\Customer|null $customer
|
|
*/
|
|
public function __construct(
|
|
public NotificationType $type,
|
|
public string $content,
|
|
public Notifiable $model,
|
|
public Customer|null $customer = null
|
|
) {
|
|
}
|
|
}
|