1. Go to this page and download the library: Download jacklove315/modal library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Http\Livewire;
use Jacklove315\Modal\ModalComponent;
class DeleteOrganisationModal extends ModalComponent
{
public function render()
{
return view('livewire.delete-organisation');
}
}
public static function closeModalOnClickAway(): bool
{
return config('jl-modal.component_defaults.close_modal_on_click_away', true);
}
public static function closeModalOnEscape(): bool
{
return config('jl-modal.component_defaults.close_modal_on_escape', false);
}
public static function modalSize(): string
{
return config('jl-modal.component_defaults.modal_size', 'md');
}
<button wire:click="$emit('open-modal', 'delete-organisation-modal', $data)">
Open modal
</button>
namespace App\Http\Livewire;
use Jacklove315\Modal\ModalComponent;
class DeleteOrganisationModal extends ModalComponent
{
public function render()
{
return view('livewire.delete-organisation-modal');
}
public function submitForm()
{
$this->closeModal();
}
}
shell
php artisan vendor:publish
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.