forked from eatvio/eatvio-infra
26 lines
497 B
PHP
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);
|
|
}
|
|
}
|