lasthourcloud/app/Http/Livewire/Sponsorship.php

29 lines
617 B
PHP
Raw Normal View History

<?php
namespace App\Http\Livewire;
use Livewire\Component;
class Sponsorship extends Component
{
2023-12-06 09:25:23 +00:00
public function getListeners()
{
$teamId = auth()->user()->currentTeam()->id;
return [
"echo-private:custom.{$teamId},TestEvent" => 'testEvent',
];
}
public function testEvent()
{
$this->emit('success', 'Realtime events configured!');
}
public function disable()
{
auth()->user()->update(['is_notification_sponsorship_enabled' => false]);
}
public function render()
{
return view('livewire.sponsorship');
}
}