Saeed Vaziry 8bffefabef
Upgrade to Livewire 3 (#103)
* upgrade to livewire 3

* fix updater

* fix modal events

* fix modal events
2024-02-04 18:11:22 +01:00

39 lines
732 B
PHP

<?php
namespace App\Http\Livewire\NotificationChannels;
use Illuminate\Contracts\View\View;
use Livewire\Component;
class AddChannel extends Component
{
public string $provider = '';
public string $label;
public string $webhook_url;
public string $email;
public string $bot_token;
public string $chat_id;
public function add(): void
{
app(\App\Actions\NotificationChannels\AddChannel::class)->add(
auth()->user(),
$this->all()
);
$this->dispatch('$refresh')->to(ChannelsList::class);
$this->dispatch('added');
}
public function render(): View
{
return view('livewire.notification-channels.add-channel');
}
}