PHP code example of khlystou / moonshine-input-datalist

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

    

khlystou / moonshine-input-datalist example snippets


use Khlystou\DatalistInputExtension\InputExtensions\Datalist;

$cities = collect(['Minsk', 'Grodno', 'Gomel', 'Mogilev']);

Text::make('City')
    ->extension(new Datalist($cities)),
// or
Text::make('City')
    ->extension(new Datalist($cities, 'cities')),