Files
opensem/resources/views/load/form/select2.blade.php
2021-04-11 00:36:41 +02:00

18 lines
567 B
PHP

@if(!defined('LOAD_SELECT2'))
@push('scripts')
<script src="{!! mix('/js/select2/select2.full.min.js', '/assets/vendor/boilerplate') !!}"></script>
<script src="{!! asset('/assets/vendor/boilerplate/js/select2/i18n/'.config('boilerplate.app.locale').'.js') !!}"></script>
<script>
function initSelect2() {
$(".select2").select2({
placeholder: "{{ __('select_a_value') }}",
allowClear: false,
width: {
value: '100%'
}
});
}
</script>
@endpush
@php(define('LOAD_SELECT2', true))
@endif