1
votes

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.

2
do you have phpmyadmin installed?Can Celik
I have XAMPP installed in my system.Hola

2 Answers

1
votes

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

1
votes

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.