update channel private
This commit is contained in:
@@ -20,7 +20,6 @@ use Modules\Linksehat\Http\Middleware\Doctor\Authentication;
|
||||
use Modules\Linksehat\Http\Middleware\Doctor\Authorization;
|
||||
use Modules\Linksehat\Http\Controllers\Api\Doctor\AuthDoctorController;
|
||||
use Modules\Linksehat\Http\Controllers\Api\Doctor\ProfileDoctorController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
@@ -32,6 +31,7 @@ use Modules\Linksehat\Http\Controllers\Api\Doctor\ProfileDoctorController;
|
||||
|
|
||||
*/
|
||||
|
||||
Broadcast::routes(['middleware' => ['auth:sanctum']]);
|
||||
Route::prefix('linksehat')->group(function () {
|
||||
|
||||
Route::get('dashboard/{query}/{limit?}', [DashboardController::class, 'index']);
|
||||
|
||||
@@ -13,6 +13,7 @@ use Illuminate\Support\Facades\Broadcast;
|
||||
|
|
||||
*/
|
||||
|
||||
Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
|
||||
return (int) $user->id === (int) $id;
|
||||
Broadcast::channel('chat.{id}', function ($user, $id) {
|
||||
// return (int) $user->id === (int) $id;
|
||||
return true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user