This commit is contained in:
xl
2023-11-10 14:01:37 +08:00
parent 6a62facef0
commit 314fadca7f
+2 -25
View File
@@ -204,7 +204,7 @@ class {$controllerName}Controller extends Controller
$_path = ltrim($_path, '/');
// $this->getData($path, $className, $fields);
$this->getData($path, $className, $fields);
return '
/**
@@ -635,34 +635,11 @@ use Kiri\ToArray;
/**
* FormData
*/
class ' . $formClass . 'Form implements ToArray, \JsonSerializable, \Stringable
class ' . $formClass . 'Form implements \Arrayable
{
' . $class . '
/**
* @return bool|string
*/
public function jsonSerialize(): bool|string
{
// TODO: Implement jsonSerialize() method.
return json_encode($this->toArray(), JSON_UNESCAPED_UNICODE);
}
/**
* @return string
*/
public function __toString(): string
{
// TODO: Implement __toString() method.
$json = $this->jsonSerialize();
if (!$json) {
return \'\';
}
return $json;
}
/**
* @return array