<?php

namespace App\Events;

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

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

  public $cawangan,$namakhazanah;

  public function __construct($cawangan,$namakhazanah)
  {
      $this->cawangan = $cawangan;
      $this->namakhazanah = $namakhazanah;
  }

  public function broadcastOn()
  {
    return ['operasi-notify'];
  }

  public function broadcastAs()
  {
    return 'operasi-event';
  }
}