Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Routing is not working laravel 5?

I have just installed fresh laravel 5.1, only root page is showing that

Route::get('/', function () {

    return view('welcome');
});

It's working perfectly but rather than any other route not working like:

Route::get('user', function () {
   return "hello";
});

It throws exception 404 not found. Please help me to get out from this. Thanks in advance.

like image 983
Swapnil Tembhurnikar Avatar asked Nov 09 '22 20:11

Swapnil Tembhurnikar


1 Answers

It may be because of rewrite mode is not enabled in your system. Either you enable it or access through the following url with index.php

http://localhost/blog/public/index.php/user
like image 62
Haz Pro Avatar answered Nov 14 '22 23:11

Haz Pro