simonmarcellinden / laravelmultiselect
Multi Select Component with Vue
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:Vue
Requires
- illuminate/support: ~7|~8
- simonmarcellinden/helperpackage: ^1.0.0
Requires (Dev)
- orchestra/testbench: ~5|~6
- phpunit/phpunit: ~9.0
README
This is where your description should go. Take a look at contributing.md to see a to do list.
Installation
Via Composer
$ composer require simonmarcellinden/laravelmultiselect
To install all required files run the follow command
$ php artisan multiSelect:install
Laravel <= 5.4
Once LaravelMultiSelect is installed you need to register the service provider with the application.
Open up config/app.php
and find the providers
key.
Add the service provider to config/app.php
SimonMarcelLinden\LaravelMultiSelect\LaravelMultiSelectServiceProvider::class,
Optionally include the Facade in config/app.php if you'd like.
"LaravelMultiSelect" => "SimonMarcelLinden\LaravelMultiSelect\Facades\LaravelMultiSelect::class",
Publish the configurations
Run this on the command line from the root of your project:
$ no config needed
A configuration file will be publish to config/scriptloader.php
.
Usage
Add the following code snippet to your view
<?php <x-multiSelect :values="$labels" /> ?>
Or use the following code snippet to pre selected labels
<?php <x-multiSelect :values="$values" :preSelect="$preSelect" /> ?>
And define in your controller the labels for displaying
<?php 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]); } } ?>
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email inof@snerve.de instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.