This commit is contained in:
root 2019-10-25 16:05:08 +08:00
parent 94401c2ebe
commit f85bb6f932
3 changed files with 4 additions and 4 deletions

View File

@ -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, '用户不存在');

View File

@ -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.

View File

@ -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')