implement creating new conversation
This commit is contained in:
@@ -10,6 +10,7 @@ use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Livewire\Attributes\On;
|
||||
use Livewire\Component;
|
||||
|
||||
class ConversationHeader extends Component
|
||||
@@ -22,6 +23,14 @@ class ConversationHeader extends Component
|
||||
$this->conversationId = $conversationId;
|
||||
}
|
||||
|
||||
#[On('conversation-updated')]
|
||||
public function refreshConversation(int $conversationId): void
|
||||
{
|
||||
if ($conversationId === $this->conversationId) {
|
||||
unset($this->conversation);
|
||||
}
|
||||
}
|
||||
|
||||
#[Computed]
|
||||
public function conversation(): Conversation
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user