📜  laravel 配置文件中的 url() - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:58.180000             🧑  作者: Mango

代码示例1
Configs are loaded really early and probably not meant to use anything from the framework except Dotenv

return [
    'photos_url' => URL::asset('xxx'),
];

Instead you can use:

return [
    'photos_url' => env('APP_URL').'/rest_of_path.ext',
];