PHP code example of steelants / modal

1. Go to this page and download the library: Download steelants/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/ */

    

steelants / modal example snippets


$this->dispatch('openModal', 'livewire-component-name', 'Modal title', $componentParameters)

/**
 * Open modal
 *
 * @param string|Array $livewireComponents Component name, can be array
 * @param string $title Modal title
 * @param array $parameters Component parameters
 * @return void
 */
public function openModal($livewireComponents, $title = "", $parameters = [])

use Livewire\Component;

class UserForm extends Component
{
  public function mount(User $user)
  {
    $this->user = $user;
  }
}