一、Ajax的用法
貌似我写的笔记就只能我才能看懂,哈哈,这也许不能怪您没有好的阅读方法,
1、定义 重置密碼 的路由
Route::patch('/usersd/{id}/repw',"UserController@repwd")->name('users.repwd');
Route::patch('test',"UserController@test");
2、返回 json 数据
public function test(){
$user=User::find(request()->id);
$this->authorize('repwd',$user);
$user->password=bcrypt("123456789");
$res = $user->save();
return response()->json([