master

laravel/framework

Last updated at: 29/12/2023 09:21

HasBroadcastChannel.php

TLDR

This file is an interface for classes that need to define methods for getting the broadcast channel route and broadcast channel name associated with an entity in the Illuminate\Contracts\Broadcasting namespace.

Methods

broadcastChannelRoute

This method defines the contract for getting the broadcast channel route definition associated with the entity. It returns a string.

broadcastChannel

This method defines the contract for getting the broadcast channel name associated with the entity. It returns a string.

<?php

namespace Illuminate\Contracts\Broadcasting;

interface HasBroadcastChannel
{
    /**
     * Get the broadcast channel route definition that is associated with the given entity.
     *
     * @return string
     */
    public function broadcastChannelRoute();

    /**
     * Get the broadcast channel name that is associated with the given entity.
     *
     * @return string
     */
    public function broadcastChannel();
}