2
I added a Select2
on the page, but it does not load at all. Someone has already gone through this?
I implemented it like this:
Page: cadastrar.blade.php
<div class="box-body">
<div class="col-md-12">
<label for="Disciplinas">Disciplinas da Matriz Curricular</label>
<select class="js-example-basic-multiple" name="disciplinas[]" id="disciplinas" multiple="multiple">
@foreach($disciplinas as $disciplina)
<option value="{{ $disciplina->id_disciplina }}">
{{ $disciplina->nome }}</option>
@endforeach
</select>
</div>
</div>
<script>
$(function() {
$('.js-example-basic-multiple').select2({
placeholder: 'selecione'
});
});
</script>
In the configuration file of Adminlte ta thus:
[
'name' => 'Select2',
'active' => true,
'files' => [
[
'type' => 'js',
'asset' => false,
'location' => '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.10/js/select2.min.js',
],
[
'type' => 'css',
'asset' => false,
'location' => '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.10/css/select2.min.css',
],
],
],
Only carries like one textarea
. Does not apply style and does not allow selecting more than one.
You open questions after questions have numerous questions open, could you observe and credit those who helped you? could contribute to the site ?
– novic