`composer require harvesthq/chosen`
Import jquery first, otherwise an error will occur
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.rawgit.com/harvesthq/chosen/gh-pages/chosen.jquery.min.js"></script>
<link
href="https://cdn.rawgit.com/harvesthq/chosen/gh-pages/chosen.min.css"
rel="stylesheet"
/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.rawgit.com/harvesthq/chosen/gh-pages/chosen.jquery.min.js"></script>
<link
href="https://cdn.rawgit.com/harvesthq/chosen/gh-pages/chosen.min.css"
rel="stylesheet"
/>
<script>
$(document).ready(function () {
$(".chosen-select").chosen({
no_results_text: "Oops, nothing found!",
});
});
</script>
<form action="http://httpbin.org/post" method="post">
<select
data-placeholder="select your favorite fruit"
multiple
class="chosen-select"
name="fruit[]"
>
<option value=""></option>
<option>Apple</option>
<option>Banana</option>
<option>Cherry</option>
<option>Kiwi fruit</option>
<option>Mango</option>
<option>Orange</option>
<option>Papaya</option>
<option>Sapota</option>
</select>
<input type="submit" />
</form>
Need more changes see chosen doc