@extends('layout.mainlayout') @section('content')
Use select2() function on select element to convert it to Select 2.
Add options inside the optgroups to for group options.
Apply Placeholder by setting option placeholder option.
Set tags: true to convert select 2 in Tag mode.
Use data('select2') function to get container of select2.
Disable Select using disabled attribute.
Set maximumSelectionLength: 2 with tags: true to limit selectin in Tag mode.