Select2 Multiple select using Livewire
Tech Stack: livewire
To use the select2 plugin, make sure you include its CSS and JS library in your project.
<link href="https://email@example.com/dist/css/select2.min.css" rel="stylesheet" /> <script src="https://firstname.lastname@example.org/dist/js/select2.min.js" defer></script>
Make sure you mark your select box with
wire:ignore directive, this will make sure livewire does not repaint the input on reload, since we don't want to lose select2 classes and selected values.