<div class="list-group mb-3">
    <a class="list-group-item list-group-item-action active" aria-current="true">
        <h5 class="mb-1">{{ __($title) }}</h5>
        <small onclick="{{ $onclick }}" class="text-warning" style="cursor: pointer">{{ $small }}</small>
    </a>
    <div class="list-group-item list-group-item-action">
        <div class="mb-1" id="{{ $id }}">
            <table class="table table-striped">
                @foreach($collection as $secretaria)
                    <tr>
                        <td>
                            <div class="form-check">
                                <input class="form-check-input" type="checkbox" name="belongsTo[]" value="{{ $secretaria->id }}" id="{{ $secretaria->id }}" {{ in_array($secretaria->id, $belongsTo ?? []) ? 'checked' : '' }} >
                                <label class="form-check-label" for="{{ $secretaria->id }}">
                                    {{ $secretaria->name }}
                                </label>
                            </div>
                        </td>
                    </tr>
                @endforeach
            </table>
        </div>
    </div>
</div>

