Browse Source

env配置

seven 1 month ago
parent
commit
f9793de9a6
2 changed files with 32 additions and 2 deletions
  1. 4 0
      .env.example
  2. 28 2
      README.md

+ 4 - 0
.env.example

@@ -73,3 +73,7 @@ JWT_REFRESH_TTL=20160
 
 IMAGE_URL=http://localhost:8091/storage/
 IMAGE_URL1=http://localhost:8091
+
+
+API_FOOTBALL_KEY=2c8e29029466779da5b820ce6d8b76e3  # 足球数据秘钥
+API_FOOTBALL_HOST=https://v3.football.api-sports.io

+ 28 - 2
README.md

@@ -1,3 +1,29 @@
-# api
 
-足球数据接口
+# 1. 克隆项目(替换<项目地址>为实际地址)
+git clone <项目地址> <项目目录> && cd <项目目录>
+
+# 2. 安装PHP依赖
+composer install
+
+# 3. 配置环境文件
+cp .env.example .env
+
+# 4. 生成应用密钥(关键步骤)
+php artisan key:generate
+
+# 5. 配置数据库(手动编辑 .env 文件中的数据库连接信息)
+
+# 6. 运行数据库迁移
+php artisan migrate
+
+# 7. 设置存储链接
+php artisan storage:link
+
+# 8. 安装前端依赖并构建(如果需要)
+npm install && npm run build
+
+# 9. 设置目录权限
+chmod -R 755 storage bootstrap/cache
+
+# 10. 启动应用
+php artisan serve