This commit is contained in:
JaguarJack
2020-09-05 16:01:18 +08:00
parent d0044ee019
commit c8a7d0291c
12 changed files with 1655 additions and 18 deletions

13
catch/cms/CmsService.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
namespace catchAdmin\cms;
use catcher\ModuleService;
class CmsService extends ModuleService
{
public function loadRouteFrom()
{
// TODO: Implement loadRouteFrom() method.
return __DIR__ . DIRECTORY_SEPARATOR . 'route.php';
}
}

30
catch/cms/model/Hello.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------
namespace catchAdmin\cms\model;
use catcher\base\CatchModel as Model;
class Hello extends Model
{
protected $name = 'hello';
protected $field = [
'id', //
'good', //
'creator_id', // 创建人ID
'created_at', // 创建时间
'updated_at', // 更新时间
'deleted_at', // 软删除
];
}

15
catch/cms/module.json Normal file
View File

@@ -0,0 +1,15 @@
{
"name": "内容管理",
"alias": "cms",
"description": "cms,博客,企业站点,内容管理",
"version": "1.0.0",
"keywords": [],
"order": 0,
"services": [
"\\catchAdmin\\cms\\CmsService"
],
"aliases": {},
"files": [],
"requires": [],
"enable": true
}

14
catch/cms/route.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
// you should user `$router`
$router->group(function () use ($router){
});
//hello路由
$router->resource('hello', '\catchAdmin\cms\controller\Hello')->middleware('auth');
//hello路由
$router->resource('hello', '\catchAdmin\cms\controller\Hello')->middleware('auth');