From 7fe2a1f802a95b50d9cc6b7271c4a8e93728d4ad Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 29 Sep 2017 01:48:16 -0700 Subject: [PATCH] Fixes #4051 - use delete method for deleting user files --- resources/views/users/view.blade.php | 2 +- routes/web/users.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index cb443c26aa..1ae0724941 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -426,7 +426,7 @@ @can('update', $user) - + @endcan diff --git a/routes/web/users.php b/routes/web/users.php index d863c4a22a..56d35cf81c 100644 --- a/routes/web/users.php +++ b/routes/web/users.php @@ -13,9 +13,9 @@ Route::group([ 'prefix' => 'users', 'middleware' => ['auth']], function () { Route::get('{userId}/restore', [ 'as' => 'restore/user', 'uses' => 'UsersController@getRestore' ]); Route::get('{userId}/unsuspend', [ 'as' => 'unsuspend/user', 'uses' => 'UsersController@getUnsuspend' ]); Route::post('{userId}/upload', [ 'as' => 'upload/user', 'uses' => 'UsersController@postUpload' ]); - Route::get( + Route::delete( '{userId}/deletefile/{fileId}', - [ 'as' => 'delete/userfile', 'uses' => 'UsersController@getDeleteFile' ] + [ 'as' => 'userfile.destroy', 'uses' => 'UsersController@getDeleteFile' ] ); Route::get( '{userId}/showfile/{fileId}',