PHP Laravel select2 js example from scratch

Here, I will let you know very simple example of generate select box using select2 jquery plugin in laravel application. Bootstrap provide very simple drop-down box. But if you want to add search with select box then you should use select2 js plugin.

Select2 plugin provide us select drop-down box with search value and there are several feature available in select2 js. So in this example i am going to give you very basic example of select2 js.

Let's see bellow full example code:

Blade File:

<!DOCTYPE html>



<title>Laravel Select2 Example</title>

<link rel="stylesheet" href="">

<link rel="stylesheet" href="" />

<script src=""></script>

<script src=""></script>



<div class="container">

<h1>Laravel Select2 Example</h1>

{!! Form::open() !!}

{!! Form::select('status', ['Pending', 'Active', 'De-Active'], null, ['class' => 'form-control sel-status']) !!}

{!! Form::close() !!}



<script type="text/javascript">

$(document).ready(function() {





I hope you found your best solution....

July 19, 2017 | 777 Viewer | Category : PHP Laravel Bootstrap JQuery Plugin

Related Posts: