From 0be3623fb3563980deb6200194604fa4f7c32225 Mon Sep 17 00:00:00 2001 From: Lukas Halbritter Date: Tue, 25 Sep 2018 15:05:03 +0200 Subject: [PATCH] Re-sorted routes to avoid an 'page not found error'. The /people/create route was covered by the /people/{person} route. Since 'create' was assumed to be an person id, the page was not found. --- routes/web.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/routes/web.php b/routes/web.php index 16c3aa7..16143f3 100644 --- a/routes/web.php +++ b/routes/web.php @@ -14,18 +14,13 @@ /****************************************************************************** * PEOPLE * ******************************************************************************/ -# Showing people Route::get('/people', 'PeopleController@index'); -Route::get('/people/{person}', 'PeopleController@show'); - -# Creating new people -Route::get('/people/create', 'PeopleController@create'); Route::post('/people', 'PeopleController@store'); -# Editing people -Route::get('/people/{person}/edit', 'PeopleController@edit'); +Route::get('/people/create', 'PeopleController@create'); +Route::get('/people/{person}', 'PeopleController@show'); Route::patch('/people/{person}', 'PeopleController@update'); - -# Deletig people -Route::get('/people/{person}/delete', 'PeopleController@delete'); Route::delete('/people/{person}', 'PeopleController@destroy'); + +Route::get('/people/{person}/edit', 'PeopleController@edit'); +Route::get('/people/{person}/delete', 'PeopleController@delete');