摘要: // 路由文件:测试路由 Route::get('admin/user/test','admin\UserController@test'); <?php namespace App\Http\Controllers\admin; //use Illuminate\Http\Request; use App\H
// 路由文件:测试路由
Route::get('admin/user/test','admin\UserController@test');
<?php
namespace App\Http\Controllers\admin;
//use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class UserController extends Controller
{
// 测试控制器方法
public function test()
{
// 渲染模板
return view('admin.user.test');
}
}
?>
// 模板文件
<!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>我的第一个模板文件</title>
</head>
<body>
<h2>This is my First Template</h2>
</body>
</html>
批改老师:天蓬老师批改时间:2019-05-13 09:24:27
老师总结:你的案例非常简单, 但是流程是正确的, 看好你