<?php

namespace App\Events\Teller;

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

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

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

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

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

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