-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Closed
Description
I'm having trouble posting data when using subdomain routes and a resource controller.
Route::group(array('domain' => '{subdomain}.' . Config::get('app.domain')), function()
{
//Resources
Route::resource('project', 'ProjectsController');
});
// Adding this resolves the issue
// Route::resource('project', 'ProjectsController');
When I try to set the action of my form to the store method:
{{ Form::open(array('action' => 'ProjectsController@store')) }}
I get the following error:
MissingMandatoryParametersException: Some mandatory parameters are missing ("subdomain") to generate a URL for route "project.store".
Also another issue when redirecting:
return Redirect::action('ProjectsController@show', array('1')); // Error (see below)
return Redirect::action('ProjectsController@show', array('mysubdomain', '1')); // Works, when manually passing the subdomain, but is this required?
InvalidParameterException: Parameter "project" for route "project.show" must match "[^/]++" ("" given) to generate a corresponding URL.
Adding the subdomain as extra parameter to the form does not resolve the issue.
Any idea what the problem could be?
Thanks!
Christophvh, mokhosh and JoseCage
Metadata
Metadata
Assignees
Labels
No labels