Refactor broadcasting configuration and enhance chat authorization: update middleware in BroadcastServiceProvider, add support user check in ChatSupport, and improve chat.js for dynamic auth endpoint handling. Update channels.php to restrict access for support conversation.

This commit is contained in:
Mekan1206 committed 2026-08-16 17:28:19 +05:00
1 parent 57dd8ee378
commit 0cf106994f
5 files changed
+40 -4

No files matched your search

+1 -3
View File
@@ -5,8 +5,6 @@
use App\Http\Middleware\EnsureChatOperator;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
use Laravel\Nova\Http\Middleware\Authenticate as NovaAuthenticate;
use Laravel\Nova\Http\Middleware\Authorize as NovaAuthorize;
class BroadcastServiceProvider extends ServiceProvider
{
@@ -24,7 +22,7 @@ public function boot(): void
Broadcast::routes([
'prefix' => 'panel',
'middleware' => ['web', NovaAuthenticate::class, NovaAuthorize::class, EnsureChatOperator::class],
'middleware' => ['web', 'auth', EnsureChatOperator::class],
]);
require base_path('routes/channels.php');