refactor code style and code review

This commit is contained in:
2024-01-15 01:11:19 +03:00
parent bc2c8df9af
commit 12e4b419ce
16 changed files with 39 additions and 40 deletions

View File

@@ -2,8 +2,8 @@
namespace App\Livewire\Chat;
use Livewire\Component;
use Illuminate\View\View;
use Livewire\Component;
class Tracker extends Component
{
@@ -11,11 +11,6 @@ class Tracker extends Component
public array $myMessages = [];
protected function getListeners(): array
{
return ['echo:direct-chat,ChatMessageUpdated' => 'notifyNewMessage'];
}
public function notifyNewMessage(string $payload): void
{
$this->myMessages[] = $payload;
@@ -26,4 +21,9 @@ class Tracker extends Component
{
return view('livewire.chat.tracker');
}
protected function getListeners(): array
{
return ['echo:direct-chat,ChatMessageUpdated' => 'notifyNewMessage'];
}
}