mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 21:18:00 +01:00
26 lines
550 B
PHP
Executable file
26 lines
550 B
PHP
Executable file
<?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::routes();
|
|
|
|
/*
|
|
* Authenticate the user's personal channel...
|
|
*/
|
|
Broadcast::channel('App.User.{userId}', function ($user, $userId) {
|
|
return (int) $user->id === (int) $userId;
|
|
});
|
|
}
|
|
}
|