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:
+5
-10
@@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user