Se adjuntan columnas de apellido paterno y materno para el usuario y validaciones de registro de usuario independiente

This commit is contained in:
2026-03-07 11:03:25 -06:00
parent 3b281faf00
commit 66081df825
10 changed files with 64 additions and 32 deletions
+6 -10
View File
@@ -1,7 +1,6 @@
<?php
use Illuminate\Support\Facades\Broadcast;
use App\Models\Conversation;
use App\Models\Conversation;
Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
return (int) $user->id === (int) $id;
@@ -10,12 +9,9 @@ Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
Broadcast::channel('chat.{conversationId}', function ($user, $conversationId) {
return Conversation::where('id', $conversationId)
->whereHas('users', fn ($q) =>
$q->where('user_id', $user->id)
)->exists();
->whereHas('users', function ($q) use ($user) {
$q->where('user_id', $user->id);
})
->exists();
});
Broadcast::channel('chat.{conversationId}', function ($user, $conversationId) {return Conversation::where('id', $conversationId)->whereHas('users', function ($q) use ($user) {$q->where('user_id', $user->id);})->exists();});