I am a newbie for Laravel framework.
I am trying out a simple URL "http://localhost/test?code=value
" and when trying to access the value of code
in controller like $_GET["code"]
or Input::get('code')
, I could not access the value in my controller.
I am using digitalocean server with nginx server.
Here is .htaccess file in my project
<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]
When i tried with simple php script in test.php file <?php
print_r($_GET);
?>
I can access the values. So, I believe there is no problem with my server settings.
I tried the answer mentioned for similar issue Laravel stripping $_GET parameters but it didnt work for me.
Any help will be appreciated. I am stuck for long time :(