mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
32 lines
605 B
PHP
32 lines
605 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Livewire\Attributes\On;
|
|
use Livewire\Component;
|
|
|
|
class Eventous extends Component
|
|
{
|
|
public function render()
|
|
{
|
|
return <<<'HTML'
|
|
<div>
|
|
<button wire:click="delete">delete</button>
|
|
</div>
|
|
HTML;
|
|
}
|
|
|
|
public function delete()
|
|
{
|
|
sweetalert()
|
|
->showDenyButton()
|
|
->info('confirm or deny action');
|
|
}
|
|
|
|
#[On('sweetalert:confirmed')]
|
|
public function onSweetalertConfirmed(array $payload): void
|
|
{
|
|
toastr()->success('sweetalert was confirmed');
|
|
}
|
|
}
|