PHP code example of jeremykes / keselect
1. Go to this page and download the library: Download jeremykes/keselect 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/ */
jeremykes / keselect example snippets
<livewire:ke-select :searchableModel="'Customers'" :searchableColumns="$search_columns" />
<livewire:ke-select :searchableModel="'Customers'" :searchableColumns="$search_columns" wire:model.live="selectedCustomerId" />
namespace App\Livewire\Components;
use Livewire\Attributes\Modelable;
use Livewire\Attributes\On;
use Livewire\Component;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Livewire\Attributes\Reactive;
class KeSelect extends Component
{
#[Reactive] public $searchableColumns;
#[Modelable] public $selectedOptionId;
public $selectedOption = null;
public $options = [];
public $search = '';
public $minSearchLength = 3;
public $searchableModel;
public $primaryDisplay;
public $optionID;
public $searchDisplay;
public $modelName;