-1
I would like to delete by ip each of the specific objects that owns it.
 `<tr class="trAdminEdit"><td><div class="input-field col s12">
            <select id="select` + index + `" class="localAdminSelection adminEdit">
            @foreach ($users as $user)
              <option value="{{$user->id}}">{{$user->name}}</option>
            @endforeach
            <i id="apagarAdmin" onClick = 'removeAdmin()'>blocked</i>
            </select>
            </div></td></tr>`
and my job is like this
function removeAdmin(event, id){
        if($('.adminEdit').length > 2){
        $('.trAdminEdit').parent().parent().remove();
        console.log('foi')
        if ($('.adminEdit').length == 2)
        $('#apagarAdmin').css('display','none');
        if ($('.adminEdit').length < {{count($users)}} && $('#apagarAdmin').css('display') == 'none')
        $('#apagarAdmin').css('display','inline-block');
      }
    }
but the function at the moment erases all administrators and not the corresponding from which I press the button.
I really appreciate the answer, but unfortunately it keeps deleting all the admins of the selection, I wanted to remind that this html it is an append of another function
– Giuseppe Fragoso
Putting the code on (https://codepen.io/pen/ is easier to understand how they have their code to execute. Or edit the question and add all your included print code from the same rendered.
– Ricardo Rosa