mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-20 18:31:36 +00:00
35 lines
680 B
PHP
35 lines
680 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 function add(): void
|
|
{
|
|
app(\App\Actions\NotificationChannels\AddChannel::class)->add(
|
|
auth()->user(),
|
|
$this->all()
|
|
);
|
|
|
|
$this->emitTo(KeysList::class, '$refresh');
|
|
|
|
$this->dispatchBrowserEvent('added', true);
|
|
}
|
|
|
|
public function render(): View
|
|
{
|
|
return view('livewire.notification-channels.add-channel');
|
|
}
|
|
}
|