Routes not working without index.php
I enabled the mod_rewrite module in the Apache HTTP server, restarted Apache service and tested again and it WORKED!!!
Below is the code i used to enable mode_rewrite;
1) Un-Hash this line in Apache/conf/httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so
2) Create a new configuration for "sample-project" without modifying the default configuration in the httpd.conf file
Directory "C:/Apache24/htdocs/sample-project"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all Directory>
Pretty URLs
The framework ships with a public/.htaccess file that is used to allow URLs without index.php. If you use Apache to serve your Laravel application, be sure to enable the mod_rewrite module.
If the .htaccess
file that ships with Laravel does not work with your
Apache installation, try this one:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
For more related help, check this answer.