This commit is contained in:
2021-03-25 18:08:13 +08:00
parent 5bf8a3a5d5
commit dc597a3ca0
+3 -2
View File
@@ -162,7 +162,7 @@ use Database\ActiveRecord;
$out = ['rules', 'tableName', 'attributes'];
if (is_object($class)) {
$methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC);
$methods = $class->getMethods();
$classFileName = str_replace(APP_PATH, '', $class->getFileName());
@@ -176,7 +176,8 @@ use Database\ActiveRecord;
$attributes = $val->getAttributes();
if (!empty($attributes)) {
foreach ($attributes as $attribute) {
$over .= " #[\\" . $attribute->getName() . "('" . implode('\',\'', $attribute->getArguments()) . "')]
$explode = explode('\\', $attribute->getName());
$over .= " #[" . env($explode) . "('" . implode('\',\'', $attribute->getArguments()) . "')]
";
}
}