mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-12-01 17:17:59 +01:00
27 lines
556 B
PHP
27 lines
556 B
PHP
|
<?php
|
||
|
|
||
|
namespace Poniverse\Ponyfm\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.*', function ($user, $userId) {
|
||
|
return (int) $user->id === (int) $userId;
|
||
|
});
|
||
|
}
|
||
|
}
|