app/Events/JobApplicationReceivedEvent.php
use App\Models\JobApplication;use Illuminate\Broadcasting\InteractsWithSockets;use Illuminate\Broadcasting\PrivateChannel;use Illuminate\Foundation\Events\Dispatchable;use Illuminate\Queue\SerializesModels; class JobApplicationReceivedEvent{ use Dispatchable, InteractsWithSockets, SerializesModels; public $application; public function __construct(JobApplication $application) { $this->application = $application; } public function broadcastOn() { return new PrivateChannel('channel-name'); }}