如何更改网站的基础 URl - Laravel 5.4
How to change Base URl of a website - Laravel 5.4
我有一个基于 laravel 5.4 的网站。该网站在我的本地主机上运行良好。但是当我将它上传到我的共享主机时。它给我一个错误
"at FileViewFinder->findInPaths('welcome', array('C:\xampp\htdocs\lrl\resources\views'))"
C:\xampp\htdocs\lrl\resources\views 这是我的本地主机 URL。我怎样才能改变这个 URl。我对 .env 文件进行了更改,并将 public 文件夹的所有文件放在根目录中。我还更改了 Appserviceprovider.php 文件。
命名空间App\Providers;
use Illuminate\Support\ServiceProvider;
use Schema;
use DB;
use View;
use Request;
我也清除了缓存,但我仍然收到屏幕截图中显示的错误
运行 php artisan config:cache
C:\xampp\htdocs\lrl\resources\views
缓存在您的配置文件中。因此,您必须通过 运行 artisan 命令 php artisan config:cache
.
清除配置缓存
清除你的 route
缓存
php artisan route:cache
如果还是不行就全部清除
php artisan config:cache
php artisan config:clear
php artisan view:clear
我有一个基于 laravel 5.4 的网站。该网站在我的本地主机上运行良好。但是当我将它上传到我的共享主机时。它给我一个错误
"at FileViewFinder->findInPaths('welcome', array('C:\xampp\htdocs\lrl\resources\views'))"
C:\xampp\htdocs\lrl\resources\views 这是我的本地主机 URL。我怎样才能改变这个 URl。我对 .env 文件进行了更改,并将 public 文件夹的所有文件放在根目录中。我还更改了 Appserviceprovider.php 文件。
命名空间App\Providers;
use Illuminate\Support\ServiceProvider;
use Schema;
use DB;
use View;
use Request;
我也清除了缓存,但我仍然收到屏幕截图中显示的错误
运行 php artisan config:cache
C:\xampp\htdocs\lrl\resources\views
缓存在您的配置文件中。因此,您必须通过 运行 artisan 命令 php artisan config:cache
.
清除你的 route
缓存
php artisan route:cache
如果还是不行就全部清除
php artisan config:cache
php artisan config:clear
php artisan view:clear