<!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>
<table border="1">
<caption>学生信息</caption>
<tr><th>编号</th><th>学号</th><th>姓名</th><th>年级</th><th>专业</th><th>专业编号</th><th>班级</th><th>学习形式</th><th>性别</th></tr>
@foreach($students as $item)
<tr>
<td>{{$item['id']}}</td>
<td>{{$item['xh']}}</td>
<td>{{$item['xingming']}}</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
</table>
</body>
</html>
Route::get('/user/info',[UserController::class,'info']);
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class UserController extends Controller
{
public $students = [ ['id'=>1,'xh'=>'202020411123','xingming'=>'卞瑞珉','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>2,'xh'=>'202020411099','xingming'=>'蔡洪超','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>3,'xh'=>'202020411095','xingming'=>'成闯','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>4,'xh'=>'202020411102','xingming'=>'高鹏涛','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>5,'xh'=>'202020411115','xingming'=>'胡睿','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>6,'xh'=>'202020411156','xingming'=>'孔令旭','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>7,'xh'=>'202020411126','xingming'=>'冷金昇','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>8,'xh'=>'202020411172','xingming'=>'李博阳','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>9,'xh'=>'202020411159','xingming'=>'刘冬昊','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>10,'xh'=>'202020411058','xingming'=>'刘龙昊','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>11,'xh'=>'202020411100','xingming'=>'刘新妍','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'女'],
['id'=>12,'xh'=>'202020411137','xingming'=>'路晓彤','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'女'],
['id'=>13,'xh'=>'202020411083','xingming'=>'吕家杰','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>14,'xh'=>'202020411112','xingming'=>'马程龙','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>15,'xh'=>'202020411032','xingming'=>'孙婷婷','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'女'],
['id'=>16,'xh'=>'202020411062','xingming'=>'唐顺富','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>17,'xh'=>'202020411084','xingming'=>'田恒奥','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>18,'xh'=>'202020411056','xingming'=>'王保帅','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>19,'xh'=>'202020411197','xingming'=>'王京京','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>20,'xh'=>'202020411066','xingming'=>'王鹏','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>21,'xh'=>'202020411182','xingming'=>'王永豪','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>22,'xh'=>'202020411054','xingming'=>'王臻','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>23,'xh'=>'202020411049','xingming'=>'王朕','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>24,'xh'=>'202020411193','xingming'=>'吴双','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>25,'xh'=>'202020411106','xingming'=>'谢镕泽','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>26,'xh'=>'202020411052','xingming'=>'许鹏飞','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>27,'xh'=>'202020411104','xingming'=>'闫庆召','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>28,'xh'=>'202020411198','xingming'=>'严若玄','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>29,'xh'=>'202020411177','xingming'=>'殷昭彬','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>30,'xh'=>'202020411132','xingming'=>'翟笑','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'女'],
['id'=>31,'xh'=>'202020411022','xingming'=>'翟秀杰','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'女'],
['id'=>32,'xh'=>'202020411039','xingming'=>'张丰军','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>33,'xh'=>'202020411124','xingming'=>'张婕','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'女'],
['id'=>34,'xh'=>'202020411169','xingming'=>'张晟源','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>35,'xh'=>'202020411152','xingming'=>'张晓锞','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'女'],
['id'=>36,'xh'=>'202020411009','xingming'=>'张新悦','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男'],
['id'=>37,'xh'=>'202020411136','xingming'=>'朱建强','nianji'=>'2020','zhuanye'=>'软件技术','zhuanyebianhao'=>'521','banji'=>'5','xuexixingshi'=>'全日制','xingbie'=>'男']];
public function info()
{
$data=$this->students;
return view('admin.login',['students'=>$data]);
}
}