Here is my routing code:
$app->get('/foo', function () {
return 'Hello World';
});
$app->get('/', function(){
return 'asd';
});
the problem is that I always get "asd" on the page, even if I visit some random route, which doesn't exist. So if I visit localhost/sadgasgasdgsa I will get 'asd' on the page. I also get 'asd', instant of 'Hello World', when I visit localhost/foo. Any ideas what the problem my be?
Note: This seems like the same question: Lumen routes not working other than '/' route However nobody has answered the question. My server confirmation simple WAMP, php 7, apache2 and mysql. While searching for solution, I added the following .htaccess file:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
However it isn't working EDIT For those who came here with the search engine, I've down-graded the version of lumen, and it started working.