代码
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
</head>
<body>
<table class="table">
<tr>
<th> <input type="checkbox" name="all" class="all" >全选/全不选</th>
<th>ID</th>
<th>管理员</th>
<th>名字</th>
<th>密码</th>
</tr>
@foreach($data as $ke=>$v)
<tr>
<td><input type="checkbox"class="al"></td>
<td>{{$v->id}}</td>
<td>{{$v->admin}}</td>
<td>{{$v->name}}</td>
<td>{{$v->pwd}}</td>
</tr>
@endforeach
</table>
{{$data->links()}}
</body>
</html>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
</script>
<script>
//全选全不选
$(".all").click(function () {
$('.al').prop('checked',$('.all').prop('checked'))
})
</script>