update: more feature

This commit is contained in:
tokumeikoi
2021-01-02 22:35:41 +09:00
parent b4d74a016a
commit f8185b51b7
5 changed files with 14 additions and 3 deletions

View File

@ -17,6 +17,16 @@ use Illuminate\Support\Facades\DB;
class UserController extends Controller
{
public function resetSecret(Request $request)
{
$user = User::find($request->input('id'));
if (!$user) abort(500, '用户不存在');
$user->token = Helper::guid();
$user->uuid = Helper::guid(true);
return response([
'data' => $user->save()
]);
}
private function filter(Request $request, $builder)
{