作业
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h2>详细信息</h2>
@if (empty($stu))
没有学生信息
@else
<div>
{{$stu['xh']}}
{{$stu['xingming']}}
<td>{{$stu['nianji']}}</td>
<td>{{$stu['zhuanye']}}</td>
<td>{{$stu['zhuanyebianhao']}}</td>
<td>{{$stu['banji']}}</td>
<td>{{$stu['xuexixingshi']}}</td>
<td>{{$stu['xingbie']}}</td>
</div>
@endif
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="{{asset('').'css/bootstrap.min.css'}}">
<title>Document</title>
</head>
<body>
<table class="table table-sm">
<thead>
<tr>
<th scope="col">编号</th>
<th scope="col">姓名</th>
<th scope="col">年级</th>
<th scope="col">专业</th>
<th scope="col">专业编号</th>
<th scope="col">班级</th>
<th scope="col">学习形式</th>
<th scope="col">性别</th>
</tr>
</thead>
<tbody>
@foreach ($students as $item )
@if ($loop->index%2)
<tr class="bgcolor">
@else
<tr>
@endif
<!-- <tr> -->
<th scope="row">{{$loop->index}}{{$item['id']}}</th>
<td>
<!-- <a href="{{url('useer/'.$item['xh'])}}">{ {$item['xingming']}}</a> -->
<a href="{{route('useer.show',$item['xh'])}}">{{$item['xingming']}}</a>
</td>
<td>{{$item['nianji']}}</td>
<td>{{$item['zhuanye']}}</td>
<td>{{$item['zhuanyebianhao']}}</td>
<td>{{$item['banji']}}</td>
<td>{{$item['xuexixingshi']}}</td>
<td>{{$item['xingbie']}}</td>
</tr>
@endforeach
<style type="text/css">
.bgcolor{
background: lightpink;
}
</style>
</body>
</html>