<div class="btn-group" role="group">
    <button class="btn btn-sm btn-primary" onclick="retryFailed({{ $row->id }})">Retry</button>
    <button class="btn btn-sm btn-danger" onclick="deleteFailed({{ $row->id }})">Delete</button>
</div>

<script>
function retryFailed(id){
    fetch("{{ url('admin/queue/failed') }}/"+id+"/retry",{method:'POST',headers:{'X-CSRF-TOKEN':'{{ csrf_token() }}'}})
    .then(r=>r.json()).then(()=>location.reload());
}
function deleteFailed(id){
    if(!confirm('Delete failed job?')) return;
    fetch("{{ url('admin/queue/failed') }}/"+id,{method:'DELETE',headers:{'X-CSRF-TOKEN':'{{ csrf_token() }}'}})
    .then(r=>r.json()).then(()=>location.reload());
}
</script>