|
|
@@ -1197,6 +1197,19 @@ if (!function_exists('message')) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+if (!function_exists('getValidatorError')) {
|
|
|
+ /**
|
|
|
+ * 错误验证
|
|
|
+ * @param $error
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ function getValidatorError($validator)
|
|
|
+ {
|
|
|
+ $errors = $validator->errors()->all();
|
|
|
+ return isset($errors[0]) ? $errors[0] : 'validator error';
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
if (!function_exists('lang')) {
|
|
|
/**
|
|
|
* 语言转换
|