44 lines
917 B
PHP
44 lines
917 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Livewire\Component;
|
|
|
|
class ModalCancel extends Component
|
|
{
|
|
public $visible = false;
|
|
public $path;
|
|
public $title;
|
|
public $message;
|
|
public $id;
|
|
public $dirty = false;
|
|
public $name;
|
|
public $loading = false;
|
|
|
|
public function mount($path, $title = null, $message = null, $id = null, $dirty = false, $name = null, $loading = false)
|
|
{
|
|
$this->path = $path;
|
|
$this->title = $title ?? 'Your Title';
|
|
$this->message = $message ?? 'Your Message';
|
|
$this->id = $id;
|
|
$this->dirty = $dirty;
|
|
$this->name = $name ?? 'Cancel';
|
|
$this->loading = $loading;
|
|
}
|
|
|
|
public function showModal()
|
|
{
|
|
$this->visible = true;
|
|
}
|
|
|
|
public function handleCancel()
|
|
{
|
|
$this->visible = false;
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.modal-cancel');
|
|
}
|
|
}
|