[{"username":"","age":22},{"username":"lisi","age":24}]
验证username值在user表中唯一可以用下面的方法
$validated=Validator::make($request->input(),[ '*.username'=>'required|unique:user' ]);
[{"username":"","age":22},{"username":"lisi","age":24}]
验证username值在user表中唯一可以用下面的方法
$validated=Validator::make($request->input(),[ '*.username'=>'required|unique:user' ]);