Implement chat support functionality: update .env.example for Reverb integration, enhance ChatController with support conversation methods, and modify Conversation model for improved chat handling. Add middleware for chat operator checks and update broadcasting configuration for Reverb.
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
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
|
||||
{
|
||||
@@ -14,6 +17,11 @@ class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
Broadcast::routes(['middleware' => ['auth:sanctum']]);
|
||||
|
||||
Broadcast::routes([
|
||||
'prefix' => 'panel',
|
||||
'middleware' => ['web', NovaAuthenticate::class, NovaAuthorize::class, EnsureChatOperator::class],
|
||||
]);
|
||||
|
||||
require base_path('routes/channels.php');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user