如何更改网站的基本URl - Laravel 5.4

问题描述 投票:1回答:2

我有一个基于laravel 5.4的网站。该网站在我的localhost上工作正常。但是当我将它上传到我的共享主机上时。它给了我一个错误

"at FileViewFinder->findInPaths('welcome', array('C:\\xampp\\htdocs\\lrl\\resources\\views'))"

C:\ xampp \ htdocs \ lrl \ resources \ views这是我的localhost URL。我怎么能改变这个URl。我在.env文件中进行了更改,并将公用文件夹的所有文件放在根目录下。我还更改了Appserviceprovider.php文件。

命名空间App \ Providers;

use Illuminate\Support\ServiceProvider;
use Schema;
use DB;
use View;
use Request;

我也清除了缓存,但我仍然得到screenshotenter image description here中显示的这个错误

laravel laravel-5 laravel-5.4
2个回答
0
投票

运行php artisan config:cache

C:\xampp\htdocs\lrl\resources\views缓存在您的配置文件中。因此,您必须通过运行artisan命令php artisan config:cache清除配置缓存。


0
投票

清除你route缓存

php artisan route:cache

如果仍然无效,请清除所有内容

php artisan config:cache
php artisan config:clear
php artisan view:clear
© www.soinside.com 2019 - 2024. All rights reserved.