xiansin 57b9e6ec5e feat: 前端 há 2 anos atrás
..
app 57b9e6ec5e feat: 前端 há 2 anos atrás
bootstrap 97f86cbc64 init há 2 anos atrás
config 57b9e6ec5e feat: 前端 há 2 anos atrás
database 97f86cbc64 init há 2 anos atrás
public 97f86cbc64 init há 2 anos atrás
resources 57b9e6ec5e feat: 前端 há 2 anos atrás
routes 57b9e6ec5e feat: 前端 há 2 anos atrás
storage 97f86cbc64 init há 2 anos atrás
tests 97f86cbc64 init há 2 anos atrás
.editorconfig 97f86cbc64 init há 2 anos atrás
.env.example 7859af64fa feat: 本地化 há 2 anos atrás
.gitattributes 97f86cbc64 init há 2 anos atrás
.gitignore 97f86cbc64 init há 2 anos atrás
.htaccess 97f86cbc64 init há 2 anos atrás
.styleci.yml 97f86cbc64 init há 2 anos atrás
404.html 97f86cbc64 init há 2 anos atrás
README.md 97f86cbc64 init há 2 anos atrás
artisan 97f86cbc64 init há 2 anos atrás
composer.json 97f86cbc64 init há 2 anos atrás
composer.lock 97f86cbc64 init há 2 anos atrás
dcat_admin_ide_helper.php 25f9ba3f77 feat: 后台 há 2 anos atrás
index.html 97f86cbc64 init há 2 anos atrás
package.json 97f86cbc64 init há 2 anos atrás
phpunit.xml 97f86cbc64 init há 2 anos atrás
server.php 97f86cbc64 init há 2 anos atrás
webpack.mix.js 97f86cbc64 init há 2 anos atrás

README.md

项目概要

该项目为 思维定制基础API标准 https://docs.qq.com/doc/DVUxlS1FrWVJYcmtG


## 技术架构

* PHP >8.0.0
* MySQL >5.6.0
* Nginx >1.12.0
* Laravel 8.x (8.0)
* PHP扩展安装fileinfo, redis, 删除禁用函数 putenv,proc_open
##安装
1. git clone 到本地
2. 执行 composer install (导入sql创建好数据库)
3. 配置 .env 中数据库连接信息,没有.env请复制.env.example命名为.env
4. 执行 php artisan key:generate
执行 php artisan migrate (可忽略)
执行 php artisan db:seed (可忽略)

Dcat-Admin 资源发布

$ php artisan admin:publish
$ php artisan admin:install

创建 JWT secret

$ php artisan jwt:secret

安装第三方组件

注意:可以自定义 composer 镜像,加快拉取速度

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

短信

$result = SmsService::send($request->mobile, $request->event, [], $user);

邮箱

  1. Mail::raw($notice, function ($message) use ($email) {
  2. $message->subject(trans('api.MAILBOX_VALIDATION_NOTIFICATION')); $message->to($email);
  3. 邮箱配置 MAIL_MAILER=smtp MAIL_HOST=ssl://smtp.163.com MAIL_PORT=465 MAIL_USERNAME=youxiang@163.com MAIL_PASSWORD=VIBTDHQAYLKJYIGC MAIL_ENCRYPTION= MAIL_FROM_ADDRESS=youxiang@163.com MAIL_FROM_NAME="${APP_NAME}" });

    文件上传

    $api->post('attachment/upload', ['uses' => 'AttachmentController@upload',]);

创建目录

注意:git clone 从仓库拉取的代码,可能会存在 storage 目录缺失的问题,需要手动创建

$ mkdir -p storage/{app,debugbar,framework,logs}
$ mkdir -p storage/framework/{cache,sessions,testing,views}

$ chmod -R 777 storage bootstrap/cache

创建 storage 到 public 的软链接

注意:如果是 Docker 环境,此步骤必须在容器内执行

$ php artisan storage:link

数据迁移

注意:如果是 Docker 环境,此步骤必须在容器内执行 注意:原始SQL 迁移文件不在本项目

$ php artisan migrate