mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
27 lines
550 B
PHP
27 lines
550 B
PHP
|
<?php
|
||
|
|
||
|
namespace FireflyIII\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;
|
||
|
});
|
||
|
}
|
||
|
}
|