<?php

namespace App\Providers;

use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;

class BroadcastServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        // Broadcasting routes are now registered in routes/web.php within the localized route group

        require base_path('routes/channels.php');

        Broadcast::channel('switch-profile', function ($user) {
            return $user;
        });

    }
}
