简体   繁体   中英

Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException Error in Laravel

I was trying to access http://localhost:8000/phpmyadmin for database in laravel. But it's showing the following error:

Symfony \\ Component \\ HttpKernel \\ Exception \\ NotFoundHttpException

Open: 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

php artisan serve

So, if anyone know the solution, please reply.

Make sure you have a route setup for phpmyadmin in your routes.php

 Route::get('/phpmyadmin',  function () {
    return 'Nothing here';
 });

This will not give you the phpmyadmin though.

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.

Also, every URI you will try tro access after http://localhost:8000/ will be considered as a route of your laravel application.

Access http://localhost:8000/phpmyadmin involves you have a route like 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.

The php artisan serve command run the PHP built-in server.
It doesn't use your apache (XAMPP) webserver, but the web server provided by php.

See PHP built-in server

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM