1

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? Commented Feb 11, 2016 at 7:47
  • I have XAMPP installed in my system. Commented Feb 11, 2016 at 8:09

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

1

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.

3 Comments

What should I return if i write the above code you have suggested in my routes.php file?
Please don't ask questions in answers. Use comments on question directly.
@CanCelik No more than before your edit. I just give you the same advice that I've already received from a moderator. Don't see any attack, I just want make your answer better, and I prefer talk than edit your answer directly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.