小丁到家最终版

Yin Bin a26c4eafd6 feat:实现枚举查询统一接口 4 months ago
.vscode 76686e3563 fixed:项目重构 4 months ago
app a26c4eafd6 feat:实现枚举查询统一接口 4 months ago
bootstrap d25edd04e0 feat:完善日志工具,方便一键修复bug 4 months ago
config 7fb6c41c7d feat:生成用户二维码、钱包明细 4 months ago
database a26c4eafd6 feat:实现枚举查询统一接口 4 months ago
doc a26c4eafd6 feat:实现枚举查询统一接口 4 months ago
inventory 6f38743a07 feat: 增加scribe文档,注意检查:Providers目录下的文件有无必要修改 4 months ago
lang 6f38743a07 feat: 增加scribe文档,注意检查:Providers目录下的文件有无必要修改 4 months ago
public a0df5b0b27 fixed:解决autho token问题 4 months ago
resources a0df5b0b27 fixed:解决autho token问题 4 months ago
routes a26c4eafd6 feat:实现枚举查询统一接口 4 months ago
script 7fb6c41c7d feat:生成用户二维码、钱包明细 4 months ago
storage 1f69f3d3ba git(vcode-setting): 不可见字符处理 5 months ago
tests 1f69f3d3ba git(vcode-setting): 不可见字符处理 5 months ago
.DS_Store a26c4eafd6 feat:实现枚举查询统一接口 4 months ago
.editorconfig 1f69f3d3ba git(vcode-setting): 不可见字符处理 5 months ago
.env.example 3224a9b615 ok 4 months ago
.gitattributes 1f69f3d3ba git(vcode-setting): 不可见字符处理 5 months ago
.gitignore d25edd04e0 feat:完善日志工具,方便一键修复bug 4 months ago
.phpstorm.meta.php a506baee41 fixed:修复枚举错误,重新生成ide helper 4 months ago
README.md 069778a6cf doc:增加文档:解决9003报错、git全局换行符配置 4 months ago
_ide_helper.php a506baee41 fixed:修复枚举错误,重新生成ide helper 4 months ago
_ide_helper_models.php a506baee41 fixed:修复枚举错误,重新生成ide helper 4 months ago
ansible.cfg 6f38743a07 feat: 增加scribe文档,注意检查:Providers目录下的文件有无必要修改 4 months ago
ansible.log 6f38743a07 feat: 增加scribe文档,注意检查:Providers目录下的文件有无必要修改 4 months ago
artisan 1f69f3d3ba git(vcode-setting): 不可见字符处理 5 months ago
composer.json 7fb6c41c7d feat:生成用户二维码、钱包明细 4 months ago
composer.lock 7fb6c41c7d feat:生成用户二维码、钱包明细 4 months ago
fix-permissions.sh 4aaabd3a26 fixed: 修复生成api文档目录的权限问题 4 months ago
index.html 5faf5873f2 fix:修复完毕,开始生成页面 4 months ago
nginx.conf de58a6344a feat:修复scribe无法点击分组的bug 4 months ago
package-lock.json a26c4eafd6 feat:实现枚举查询统一接口 4 months ago
package.json 1f69f3d3ba git(vcode-setting): 不可见字符处理 5 months ago
php.ini de58a6344a feat:修复scribe无法点击分组的bug 4 months ago
phpunit.xml 1f69f3d3ba git(vcode-setting): 不可见字符处理 5 months ago
postcss.config.js 1f69f3d3ba git(vcode-setting): 不可见字符处理 5 months ago
settings.json a26c4eafd6 feat:实现枚举查询统一接口 4 months ago
tailwind.config.js 1f69f3d3ba git(vcode-setting): 不可见字符处理 5 months ago
vite.config.js 1f69f3d3ba git(vcode-setting): 不可见字符处理 5 months ago

README.md

安装

- 1.创建.env配置
    复制项目根目录.env.example文件,将其改名或重命名为.env
- 2.修改.env配置
    DB_CONNECTION=sqlite    // 将sqlite改为mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=            // 填写数据库名称
    DB_USERNAME=root        // 数据库账号
    DB_PASSWORD=            // 数据库密码
- 3.创建.env配置填写的同名数据库
- 4.开启redis服务
- 5.执行composer命令
    ```composer install --prefer-dist```
- 6.执行迁移文件
    ```php artisan migrate```
- 7.安装owl-admin
    ```php artisan admin:install```
- 8.开启serve服务
    ```php artisan serve```

设置 linux 允许 php 以 80 端口启动

sudo setcap 'cap_net_bind_service=+ep' /www/server/php/82/bin/php

停止宝塔 nginx 自动启动

sudo systemctl disable nginx

Rules 提示词

Always respond in 中文
您是一位专业PHP程序员,以下是您要遵守的规则:
1. 使用框架laravel、owl-admin
2. controller代码生成到 app/Http/Controllers/Client
3. service代码生成到 app/Services/Client
4. controller要生成scribe的api文档注释,方法注释名称前面添加分组名(以区分不同类的api),不要添加@group注解关键字,添加@description,请求参数,@response, 参数给出Example(默认值)
5. service代码对异常添加日志
6. 如果需要获取当前登录用户,将 Auth::id() 改为 Auth::user() 方式获取获取
7. 代码中所有增删改(非读)方法,全部添加事务处理
8. controller代码生成后,在routes/api.php中添加路由
9. 方法体中关键操作要添加行注释

重新解决 vscode 提示魔术方法不存在的问题

php artisan ide-helper:generate
php artisan ide-helper:models -N
php artisan ide-helper:meta

git 提交统一配置换行符为 LF 方案

# 设置全局换行符为 LF
git config --global core.eol lf
git config --global core.autocrlf input
git config --global core.safecrlf warn

解决命令行中总是报错 9003xdebug 调试端口连接失败问题

[Xdebug]
zend_extension=xdebug

; 仅启用需要的功能,减少性能开销
xdebug.mode=debug

; 仅在需要时启动调试
xdebug.start_with_request=trigger

; 保持默认端口配置
xdebug.client_port=9003
xdebug.client_host=127.0.0.1

; 添加日志便于排查问题
xdebug.log=/tmp/xdebug.log