added event and call
This commit is contained in:
committed by
Hafifie PKB
parent
6f52b6256f
commit
d79c367d48
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||
|
||||
class AutoSerahan implements ShouldBroadcast
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
public $pengesahan;
|
||||
public $cawangan;
|
||||
public $kodlaluan;
|
||||
public $id;
|
||||
|
||||
public function __construct($pengesahan,$id,$cawangan,$kodlaluan)
|
||||
{
|
||||
$this->pengesahan = $pengesahan;
|
||||
$this->id = $id;
|
||||
$this->cawangan = $cawangan;
|
||||
$this->kodlaluan = $kodlaluan;
|
||||
}
|
||||
|
||||
public function broadcastOn()
|
||||
{
|
||||
return ['autoserahan-notice'];
|
||||
}
|
||||
|
||||
public function broadcastAs()
|
||||
{
|
||||
return 'autoserahan-event';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user