mirror of
https://github.com/v2board/v2board.git
synced 2025-01-30 18:19:12 +08:00
update
This commit is contained in:
parent
94401c2ebe
commit
f85bb6f932
@ -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, '用户不存在');
|
||||
|
@ -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.
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user