Add new Livewire component and update subscription actions
This commit is contained in:
28
app/Livewire/LayoutPopups.php
Normal file
28
app/Livewire/LayoutPopups.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class LayoutPopups extends Component
|
||||
{
|
||||
public function getListeners()
|
||||
{
|
||||
$teamId = auth()->user()->currentTeam()->id;
|
||||
return [
|
||||
"echo-private:team.{$teamId},TestEvent" => 'testEvent',
|
||||
];
|
||||
}
|
||||
public function testEvent()
|
||||
{
|
||||
$this->dispatch('success', 'Realtime events configured!');
|
||||
}
|
||||
public function disable()
|
||||
{
|
||||
auth()->user()->update(['is_notification_sponsorship_enabled' => false]);
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.layout-popups');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user