I am using laravel framework. I need to access controller method with the name of the given url. My routes code look like below :
<?php
Route::get('home','HomeController@showWelcome');
?>
HomeController.php look like this
<?php
class HomeController extends BaseController {
public function showWelcome()
{
return View::make('hello');
}
}
?>
My problem is can't able to access the method of showWelcome while giving the url like http://example.com/home
But i can able to access with the url http://example.com/index.php/home
How to sove this issue.. can anyone help me to do this..Thanks in advance.
.htaccess file look like below :
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>