PHP code example of lara-pack / livewire-select2
1. Go to this page and download the library: Download lara-pack/livewire-select2 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/ */
lara-pack / livewire-select2 example snippets
// In your Livewire Component Controller
public $selectedCity = ['id' => '1', 'text' => 'Jakarta'];
// In your Livewire Component Controller
public $selectedTags = [
['id' => '1', 'text' => 'PHP'],
['id' => '2', 'text' => 'Laravel']
];