24 lines
457 B
PHP
24 lines
457 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Support\Facades\Broadcast;
|
|
|
|
class BroadcastServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
Broadcast::route(['middleware' => ['web']]);
|
|
|
|
Broadcast::auth('channel-name.*', function ($user, $id) {
|
|
return true;
|
|
});
|
|
}
|
|
}
|