Framework\Providers\BroadcastServiceProvider::boot PHP Method

boot() public method

Bootstrap any application services.
public boot ( ) : void
return void
    public function boot()
    {
        Broadcast::routes();
        /*
         * Authenticate the user's personal channel...
         */
        Broadcast::channel('App.User.*', function ($user, $userId) {
            return (int) $user->id === (int) $userId;
        });
    }
BroadcastServiceProvider