I am having issues getting the page to render when using a parameter in a create controller. My show controller works but my create controller doesn't. The error thrown is a 404.
Sorry, the page you are looking for could not be found.
My controller looks like:
// Show
public function show(Country $country, State $state){
return view('state.show', compact('state'));
}
// Create
public function create(Country $country) {
return view('state.create', compact('country'));
}
My route looks like:
Route::get('country/{country}/state/{state}', 'StateController@show');
Route::get('country/{country}/state/create', 'StateController@create');
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire