[英]Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException Error in Laravel
I was trying to access http://localhost:8000/phpmyadmin for database in laravel. 我试图访问laravel中数据库的http:// localhost:8000 / phpmyadmin 。 But it's showing the following error:
但它显示以下错误:
Symfony \\ Component \\ HttpKernel \\ Exception \\ NotFoundHttpException
Symfony \\组件\\ HttpKernel \\异常\\ NotFoundHttpException
Open: C:\\xampp\\htdocs\\laravel\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php
打开:C:\\ xampp \\ htdocs \\ laravel \\ vendor \\ laravel \\ framework \\ src \\ Illuminate \\ Routing \\ RouteCollection.php
$others = $this->checkForAlternateVerbs($request);
if (count($others) > 0) {
return $this->getOtherMethodsRoute($request, $others);
}
throw new NotFoundHttpException;
I used following command to open my server and it automatically open with 8000 port that's why i have to use http://localhost:8000/phpmyadmin 我使用以下命令打开服务器,它自动以8000端口打开,这就是为什么我必须使用http:// localhost:8000 / phpmyadmin的原因
php artisan serve
PHP的工匠服务
So, if anyone know the solution, please reply. 因此,如果有人知道解决方案,请回复。
Make sure you have a route setup for phpmyadmin in your routes.php 确保您在routes.php中为phpmyadmin设置了路由
Route::get('/phpmyadmin', function () {
return 'Nothing here';
});
This will not give you the phpmyadmin though. 但是,这不会给您phpmyadmin。
If you have phpmyadmin properly installed and configured on your local, you should just access it from http://localhost/phpmyadmin
with or without your laravel application running on http://localhost:8000
, that make no difference. 如果您在本地正确安装并配置了
http://localhost/phpmyadmin
,则无论是否在laravel应用程序在http://localhost:8000
上运行,都应该从http://localhost/phpmyadmin
访问它,这没有什么区别。
Also, every URI you will try tro access after http://localhost:8000/
will be considered as a route of your laravel application. 另外,您将在
http://localhost:8000/
之后尝试tro访问的每个URI都将被视为laravel应用程序的路由。
Access http://localhost:8000/phpmyadmin
involves you have a route like Route::get('/phpmyadmin', /** ... /*);
访问
http://localhost:8000/phpmyadmin
涉及到您有一条类似于Route::get('/phpmyadmin', /** ... /*);
的路由Route::get('/phpmyadmin', /** ... /*);
If you doesn't have phpmyadmin installed and accessible on your local, download it and follow the instructions to make it accessible from your web server. 如果您尚未在本地安装phpmyadmin并可以访问,请下载该文件并按照说明进行操作,以使其可从Web服务器访问。
The php artisan serve
command run the PHP built-in server. php artisan serve
命令运行PHP内置服务器。
It doesn't use your apache (XAMPP) webserver, but the web server provided by php. 它不使用您的Apache(XAMPP)网络服务器,而是使用php提供的网络服务器。
See PHP built-in server 查看PHP内置服务器
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.