27 lines
556 B
PHP
27 lines
556 B
PHP
<?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;
|
|
});
|
|
|
|
}
|
|
}
|