select2 in laravel

Select2 in Laravel

Select2 is a jQuery replacement for select boxes which provides searching, tagging, remote data sets and infinite scrolling.

Installation

Let’s use cdnjs for this tutorial.

1) CSS

2) Javascript

3) Add fields in migration and fill users table

Example

1) web.php

2) welcome.blade.php

3) Output

select2 image

Tagging

1) welcome.blade.php

2) Output

tagging

Using remote data set

1) web.php

2) welcome.blade.php

3) Output

remote data

Video

2 thoughts on “Select2 in Laravel

Leave a Comment