<?php

namespace App\Events;

use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;

class NotifikasiAGH implements ShouldBroadcast
{
  use Dispatchable, InteractsWithSockets, SerializesModels;

  public $kodcaw,$message,$typeerror,$pc;

  public function __construct($kodcaw,$message,$typeerror,$pc)
  {
      $this->kodcaw = $kodcaw;
      $this->message = $message;
      $this->typeerror = $typeerror;
      $this->pc = $pc;
  }

  public function broadcastOn()
  {
    return ['notice-agh'];
  }

  public function broadcastAs()
  {
    return 'my-agh';
  }
}