返回我的第一个i请......登陆

我的第一个i请求响应案例

JasonKim2019-05-12 21:56:08205
// 路由文件:测试路由
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>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送