Files
eatvio-infra/app/Livewire/Chat/LastUsers.php
2023-10-04 17:57:09 +03:00

26 lines
497 B
PHP

<?php
namespace App\Livewire\Chat;
use Livewire\Component;
class LastUsers extends Component
{
public $lastChatUsers;
public $activeUserId;
public $curUserId;
public $chanId;
public function render()
{
return view('livewire.chat.last-users');
}
public function switchTo($id)
{
$this->activeUserId = $id;
$this->dispatch('updateRecipientId', id: $id)->to('chat.message-window',);
redirect()->route('chat.show', $id);
}
}