misc_pterodactyl-panel/app/Providers/BroadcastServiceProvider.php

25 lines
524 B
PHP
Raw Permalink Normal View History

<?php
2017-04-15 00:46:50 +00:00
namespace Pterodactyl\Providers;
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;
});
}
}