简体   繁体   English

访问代码中的应用程序 url 时 Laravel 5 配置缓存问题

[英]Laravel 5 config cache issue while accessing app url inside the code

I'm using laravel 5.5.我正在使用 Laravel 5.5。 Recently I have disabled ssl for my site.最近我为我的网站禁用了 ssl。 So I just edited .env file and set APP_URL as http://www.example.com instead of https://www.example.com .所以我只是编辑了 .env 文件并将 APP_URL 设置为http://www.example.com而不是https://www.example.com But when ever I try access url inside my code it returns with https as previously.但是当我尝试在我的代码中访问 url 时,它会像以前一样返回 https。 for eg url('sample_route') returns https://www.example.com/sample_route .例如url('sample_route')返回https://www.example.com/sample_route I have tried clearing cache and configs through artisan commands.我尝试通过 artisan 命令清除缓存和配置。 but still getting same result.但仍然得到相同的结果。

您也可以使用 cache & config clear 命令尝试命令 composer dump-autoload。

Have you tried all php artisan commands in clearing caches?您是否尝试过清除缓存中的所有 php artisan 命令?

php artisan route:clear
php artisan config:cache
php artisan cache:clear    
php artisan view clear

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM