2016-09-03 23:09:00 +02:00
|
|
|
<?php
|
|
|
|
|
2017-04-15 02:46:50 +02:00
|
|
|
namespace Pterodactyl\Providers;
|
2016-09-03 23:09:00 +02:00
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
use Illuminate\Support\Facades\Broadcast;
|
|
|
|
|
|
|
|
class BroadcastServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
Broadcast::routes();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Authenticate the user's personal channel...
|
|
|
|
*/
|
|
|
|
Broadcast::channel('App.User.*', function ($user, $userId) {
|
|
|
|
return (int) $user->id === (int) $userId;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|