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.
This commit is contained in:
Lukas Halbritter
2018-09-25 15:05:03 +02:00
parent 81cc32db29
commit 0be3623fb3
+5 -10
View File
@@ -14,18 +14,13 @@
/****************************************************************************** /******************************************************************************
* PEOPLE * * PEOPLE *
******************************************************************************/ ******************************************************************************/
# Showing people
Route::get('/people', 'PeopleController@index'); 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'); Route::post('/people', 'PeopleController@store');
# Editing people Route::get('/people/create', 'PeopleController@create');
Route::get('/people/{person}/edit', 'PeopleController@edit'); Route::get('/people/{person}', 'PeopleController@show');
Route::patch('/people/{person}', 'PeopleController@update'); Route::patch('/people/{person}', 'PeopleController@update');
# Deletig people
Route::get('/people/{person}/delete', 'PeopleController@delete');
Route::delete('/people/{person}', 'PeopleController@destroy'); Route::delete('/people/{person}', 'PeopleController@destroy');
Route::get('/people/{person}/edit', 'PeopleController@edit');
Route::get('/people/{person}/delete', 'PeopleController@delete');