安装插件后的基础文件

This commit is contained in:
panx
2024-07-13 12:53:20 +08:00
parent db41c93a84
commit 7f33ce4bf6
318 changed files with 31711 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types = 1);
namespace app\admin\controller\demo;
use app\AdminController;
class Index extends AdminController{
public function index() {
echo '后台首页控制器<br/>';
return view('/demo/index/index');
}
}

View File

@@ -0,0 +1,29 @@
<?php
declare (strict_types = 1);
namespace app\admin\model;
use think\Model;
/**
* @mixin \think\Model
*/
class Demo extends Model
{
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'create_time';
protected $updatetime = 'update_time';
// 字段修改器
public function setSortAttr($value)
{
if (is_empty($value)) {
return self::max('id') + 1;
}
return $value;
}
}

View File

@@ -0,0 +1,31 @@
<?php
namespace app\admin\validate;
use think\Validate;
class Demo extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@@ -0,0 +1,12 @@
<!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>我是后台首页控制器模板</title>
</head>
<body>
我是后台首页控制器模板
</body>
</html>

View File

@@ -0,0 +1,37 @@
<?php
declare (strict_types = 1);
// +----------------------------------------------------------------------
// | swiftAdmin 极速开发框架 [基于 WebMan 开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2020-2030 http://www.swiftadmin.net
// +----------------------------------------------------------------------
// | swiftAdmin.net High Speed Development Framework
// +----------------------------------------------------------------------
// | Author: meystack <coolsec@foxmail.com> Apache2 License
// +----------------------------------------------------------------------
namespace app\index\controller;
use app\HomeController;
/**
* 插件示例
*/
class Demo extends HomeController
{
/**
* 会员中心首页模板
* @return \support\Response
* @throws \Psr\SimpleCache\InvalidArgumentException
*/
public function index(): \support\Response
{
return view('/demo/index');
}
public function demo()
{
return response('demo');
}
}

View File

@@ -0,0 +1,21 @@
<layout name="layout:layout"/>
<!-- 内容主体区域 -->
<div id="content">
<div class="layui-card">
<div class="layui-card-body"> 示例页面 TODO...</div>
<!-- // 创建数据实例 -->
<table id="lay-tableList" lay-filter="lay-tableList"></table>
</div>
</div>
<!-- // 列表工具栏 -->
<script type="text/html" id="tableBar">
<!-- // TODO-->
</script>
<script>
layui.use(['table','jquery'], function () {
let $ = layui.jquery;
let table = layui.table;
})
</script>