mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 03:26:52 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			524 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			524 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
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;
 | 
						|
        });
 | 
						|
    }
 | 
						|
}
 |