* * @version 1.0.0 */ class GlobalNotification implements ShouldBroadcastNow { use Dispatchable, InteractsWithBroadcasting, InteractsWithSockets, SerializesModels; /** * Constructor */ public function __construct( public string $title, public string $message, public string $type = 'info', public int $timeout = 15 ) {} /** * Nombre del evento */ public function broadcastAs(): string { return 'App\Events\Notification'; } /** * Canal de envío */ public function broadcastOn(): Channel { return new PrivateChannel('Global'); } }