You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

28 lines
1.1 KiB

<?php
declare(strict_types=1);
/*
|--------------------------------------------------------------------------
| 站点配置
|--------------------------------------------------------------------------
|
| 站点对外地址从 .env 的 APP_URL 读取(env('app.url') → APP_URL)。
|
| 为什么单独建 site.php 而不是塞进 config/app.php:
| app.php 是框架核心配置,项目里只覆盖其中几个键时,很容易让人误以为
| 「默认值也被改过」。域名这类业务属性放独立分组,归属更清楚。
|
| 当前消费方:Common::health 会回带站点地址,方便联调时确认
| 「后端读到的域名」与「微信后台配置的域名」是否一致。
| 后续分享链接、海报二维码、订阅消息回调都会读这里。
*/
return [
// 对外地址,不带结尾斜杠。留空表示尚未配置
'url' => env('app.url', ''),
// 接口前缀。与 route/api.php 的分组保持一致,
// 放在配置里是为了让 health 能自报「接口挂在哪个前缀下」,
// 避免前端拼错地址时去怀疑域名
'api_prefix' => 'api/v1',
];