mirror of
https://github.com/v2board/v2board.git
synced 2025-01-31 02:29:14 +08:00
update
This commit is contained in:
parent
94401c2ebe
commit
f85bb6f932
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Admin;
|
namespace App\Http\Controllers\Admin;
|
||||||
|
|
||||||
use App\Http\Requests\Admin\UserSave;
|
use App\Http\Requests\Admin\UserUpdate;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\Order;
|
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'));
|
$user = User::find($request->input('id'));
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
abort(500, '用户不存在');
|
abort(500, '用户不存在');
|
||||||
|
@ -4,7 +4,7 @@ namespace App\Http\Requests\Admin;
|
|||||||
|
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
class UserSave extends FormRequest
|
class UserUpdate extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Get the validation rules that apply to the request.
|
* Get the validation rules that apply to the request.
|
@ -39,7 +39,7 @@ Route::prefix('v1')
|
|||||||
Route::post('order/repair', 'Admin\\OrderController@repair');
|
Route::post('order/repair', 'Admin\\OrderController@repair');
|
||||||
// User
|
// User
|
||||||
Route::get('user', 'Admin\\UserController@index');
|
Route::get('user', 'Admin\\UserController@index');
|
||||||
Route::post('user/save', 'Admin\\UserController@save');
|
Route::post('user/update', 'Admin\\UserController@update');
|
||||||
});
|
});
|
||||||
// User
|
// User
|
||||||
Route::prefix('user')
|
Route::prefix('user')
|
||||||
|
Loading…
Reference in New Issue
Block a user