I've just started learning laravel and I'm using MAMP. I have a form at this url: http://localhost:8888/laravel-site/my-new-app/public/ducks but when I submit the form it takes me to this url: http://localhost:8888/ducks and doesn't stay where I'd expect it to.
The routes.php file contains this:
Route::get('ducks', function()
{
return View::make('duck-form');
});
// route to process the ducks form
Route::post('ducks', function()
{
// process the form here
});
In my .htaccess file I have this:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /laravel-site/my-new-app/public/
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
I'm probably missing something really obvious, but why when I submit the form does it not stay on the same page?