[英]Laravel 5.4 - Route does not exist
I have a simple link on a page to a URL test: 我在页面上有一个指向URL测试的简单链接:
<a href="{{ URL('test')}}" title="test">
In web.php I have defined: 在web.php中,我定义了:
Route::get('test', function(){
$parts = DB::table('partdetails')->limit(100);
dd($parts);
return view('test',compact($parts));
})->name('test');
I also have a very basic view in the root directory of resources\\views call test.blade.php. 我在resources \\ views的根目录中也有一个非常基本的视图,调用test.blade.php。
When I try this I get 当我尝试这个我得到
The requested resource /test was not found on this server.
在此服务器上找不到请求的资源/测试。
I cannot get this! 我无法得到这个!
A few things come to mind.. 我想到了几件事。
.htaccess
file is like the one coming with Laravel. .htaccess
文件类似于Laravel附带的文件。 APP_URL
in .env is correct APP_URL
中的APP_URL正确
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.