Laravel项目路由正在产生错误



我正在创建一个要托管在服务器上的应用程序,我使用了.htaccess,但加载的第一个页面(通常是登录屏幕(其路径在我的资源文件夹中(已更改为公用文件夹,我单击其他任何位置,因为所有内容都链接到公用文件夹,这与它应该在资源文件夹中的位置不一样。。。该应用程序运行良好,只是路由问题给了我一个问题,所以当我点击其他地方时,它会说,"在服务器上找不到请求的url">

我还尝试将视图文件夹放入公用文件夹,并在那里路由

我的主页设置为:

Route::get('/', function () {
return view('auth/login');
});

但当移动到公用文件夹时,会出现错误,错误为

InvalidArgumentException
View [auth.login] not found.

清除缓存并重新启动服务器:

composer dump-autoload;
//---Flush the application cache
php artisan cache:clear;
//---Remove the configuration cache file
php artisan config:cache;
php artisan config:clear;
//---Remove Routes Cache
php artisan route:clear;

最新更新