lasthourcloud/app/Livewire/LayoutPopups.php

28 lines
496 B
PHP
Raw Permalink Normal View History

<?php
2023-12-07 18:06:32 +00:00
namespace App\Livewire;
use Livewire\Component;
class LayoutPopups extends Component
{
2023-12-06 09:25:23 +00:00
public function getListeners()
{
$teamId = auth()->user()->currentTeam()->id;
2024-06-10 20:43:34 +00:00
2023-12-06 09:25:23 +00:00
return [
"echo-private:team.{$teamId},TestEvent" => 'testEvent',
2023-12-06 09:25:23 +00:00
];
}
2024-06-10 20:43:34 +00:00
public function testEvent()
2023-12-06 09:25:23 +00:00
{
2023-12-07 18:06:32 +00:00
$this->dispatch('success', 'Realtime events configured!');
2023-12-06 09:25:23 +00:00
}
2024-06-10 20:43:34 +00:00
public function render()
{
return view('livewire.layout-popups');
}
}