mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
24 lines
727 B
PHP
24 lines
727 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('App.User.{id}', function ($user, $id) {
|
|
// nlog($id);
|
|
|
|
// return false;
|
|
// // return (int) $user->id === (int) $id;
|
|
// });
|
|
|
|
Broadcast::channel('company-{company_key}', function (\App\Models\User $user, string $company_key) {
|
|
return $user->company()->company_key === $company_key;
|
|
});
|