From f85bb6f93282aaf56bc2e318f2a44f0496ffd635 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 25 Oct 2019 16:05:08 +0800 Subject: [PATCH] update --- app/Http/Controllers/Admin/UserController.php | 4 ++-- app/Http/Requests/Admin/{UserSave.php => UserUpdate.php} | 2 +- routes/api.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename app/Http/Requests/Admin/{UserSave.php => UserUpdate.php} (96%) diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 69e36223..8507a5e4 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers\Admin; -use App\Http\Requests\Admin\UserSave; +use App\Http\Requests\Admin\UserUpdate; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Models\Order; @@ -25,7 +25,7 @@ class UserController extends Controller ]); } - public function update (UserSave $request) { + public function update (UserUpdate $request) { $user = User::find($request->input('id')); if (!$user) { abort(500, '用户不存在'); diff --git a/app/Http/Requests/Admin/UserSave.php b/app/Http/Requests/Admin/UserUpdate.php similarity index 96% rename from app/Http/Requests/Admin/UserSave.php rename to app/Http/Requests/Admin/UserUpdate.php index f473bd15..3209ef30 100644 --- a/app/Http/Requests/Admin/UserSave.php +++ b/app/Http/Requests/Admin/UserUpdate.php @@ -4,7 +4,7 @@ namespace App\Http\Requests\Admin; use Illuminate\Foundation\Http\FormRequest; -class UserSave extends FormRequest +class UserUpdate extends FormRequest { /** * Get the validation rules that apply to the request. diff --git a/routes/api.php b/routes/api.php index 592d9dd9..e40a58d2 100755 --- a/routes/api.php +++ b/routes/api.php @@ -39,7 +39,7 @@ Route::prefix('v1') Route::post('order/repair', 'Admin\\OrderController@repair'); // User Route::get('user', 'Admin\\UserController@index'); - Route::post('user/save', 'Admin\\UserController@save'); + Route::post('user/update', 'Admin\\UserController@update'); }); // User Route::prefix('user')