PHP code example of simonmarcellinden / laravelmultiselect

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

    

simonmarcellinden / laravelmultiselect example snippets


    SimonMarcelLinden\LaravelMultiSelect\LaravelMultiSelectServiceProvider::class,

    "LaravelMultiSelect" => "SimonMarcelLinden\LaravelMultiSelect\Facades\LaravelMultiSelect::class",

 
    <x-multiSelect :values="$labels" />

 
   <x-multiSelect :values="$values" :preSelect="$preSelect" />

 

namespace App\Http\Controllers;

class HomeController extends Controller  {

    public function index() {
        // Defaults labels
        $labels = [
            ['key' => '34123' , 'label' => 'License'],
            ['key' => '34124' , 'label' => 'GitHub Stars'],
            ['key' => '34125' , 'label' => 'Npm Monthly Downloads'],
            ['key' => '34126' , 'label' => 'Full Test Coverage'],
            ['key' => '34127' , 'label' => 'No Dependencies'],
            ['key' => '34128' , 'label' => 'Lorem Ipsum'],
            ['key' => '34129' , 'label' => 'AllPCB'],
            ['key' => '34130' , 'label' => 'DevTools'],
            ['key' => '34131' , 'label' => '@Deprecated'],
            ['key' => '34132' , 'label' => 'VueJS'],
            ['key' => '34133' , 'label' => 'Laravel'],
        ];        
        
        return view('welcome', ['labels' => $labels]);
    }
}
 bash
$ php artisan multiSelect:install