Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
吴磊(PHP)
/
admin-skeleton
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2016c1ff
authored
Jun 08, 2023
by
wulei@ldy.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix md title style
1 parent
76fce8a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
README.md
README.md
View file @
2016c1f
#后台管理系统
#
后台管理系统
基于dcat-admin、与laravel-wechat的后台管理系统,可以快速开发搭建小程序及其后管平台
###环境与包
###
环境与包
php7.4
mysql5.7
dcat-admin: ^2.0
...
...
@@ -10,7 +10,7 @@ laravel-wechat: ^6.0
jwt-auth: ^1.0
telescope: ^4.0
###主要集成项及能力
###
主要集成项及能力
####dcat-admin
[
dcat-admin
](
https://learnku.com/docs/dcat-admin/2.x
)
是一个只需很少的代码即可快速构建出一个功能完善的高颜值后台系统.
...
...
@@ -28,7 +28,7 @@ $router->resource('users', 'UserController');
```
更多信息可以参考
[
dcat-admin中文文档
](
https://learnku.com/docs/dcat-admin/2.x/quick-start/8082
)
####laravel-wechat
####
laravel-wechat
laravel-wechat是基于
[
EasyWeChat
](
https://easywechat.com/5.x/
)
的laravel框架SDK.
该SDK封装了各类微信生态开放API,极大程度上简化了微信相关业务的开发工作。
在配置文件
`config/wechat.php`
中增加相关配置
...
...
@@ -70,7 +70,7 @@ Facade::officialAccount('foo'); // `foo` 为配置文件中的名称,默认为
```
更新信息参考
[
laravel-wechat
](
https://github.com/overtrue/laravel-wechat/tree/6.x
)
###jwt
###
jwt
集成
`jwt-auth`
实现了
`api`
的权限校验。可以直接使用中间件
`auth`
或者
`auth:api`
对api进行鉴权。
```
php
...
...
@@ -104,13 +104,13 @@ $router->group([
$router->post('logout', [AuthController::class, 'logout'])->name('logout');
});
```
####telescope调试工具
####
telescope调试工具
[
Laravel Telescope
](
https://learnku.com/docs/laravel/10.x/telescopemd/14917#introduction
)
是 Laravel 本地开发环境的绝佳伴侣。Telescope 可以方便查看应用程序的请求、异常、日志条目、数据库查询、排队的作业、邮件、消息通知、缓存操作、定时计划任务、变量打印等。

目前已集成在
`dcat-admin`
中,在管理后台顶部可以找到入口。
生产环境可以考虑隐藏或者不安装。
####Api标准化输出
####
Api标准化输出
增加了针对
`Api`
接口的标准化输出,默认对整个
`api`
启用。将所有的可
`json`
序列化的数据统一转化为标准化输出.
编写
`api`
代码时无需关注返回结构,只需要返回对应的数据(即
`data`
节点)即可
```
php
...
...
@@ -155,7 +155,7 @@ $router->any('test', function() {
"data"
:
null
}
```
####异常处理
####
异常处理
对整个
`api`
的异常进行了统一的捕获和格式化输出,如上文的未授权访问输出。
其中系统异常在
`app\Exceptions\Handler.php`
统一捕获,将系统异常转换为标准化输出。错误码主要使用
`HTTP code`
,未捕获的统一使用
`500`
.
```
php
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment