1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00
invoiceninja/routes/channels.php
2024-10-08 11:21:14 +11:00

17 lines
566 B
PHP

<?php
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
| application supports. The given channel authorization callbacks are
| used to check if an authenticated user can listen to the channel.
|
*/
Broadcast::channel('company-{company_key}', function (\App\Models\User $user, string $company_key) {
return $user->company()->company_key === $company_key;
});