<?php

namespace App\Events;

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

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

  public $pengesahan;
  public $cawangan;
  public $kodlaluan;
  public $jenis;

  public function __construct($pengesahan,$jenis,$cawangan,$kodlaluan)
  {
      $this->pengesahan = $pengesahan;
      $this->jenis = $jenis;
      $this->cawangan = $cawangan;
      $this->kodlaluan = $kodlaluan;
  }

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

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