变更
This commit is contained in:
+10
-5
@@ -206,7 +206,7 @@ use Kiri\Router\Annotate\AutoController;
|
|||||||
|
|
||||||
$_path = ltrim($_path, '/');
|
$_path = ltrim($_path, '/');
|
||||||
|
|
||||||
$this->getData($className, $fields);
|
$this->getData($path, $className, $fields);
|
||||||
|
|
||||||
return '
|
return '
|
||||||
/**
|
/**
|
||||||
@@ -471,7 +471,7 @@ use Kiri\Router\Annotate\AutoController;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function getData($formClass, $fields): string
|
private function getData($path, $formClass, $fields): string
|
||||||
{
|
{
|
||||||
$html = '';
|
$html = '';
|
||||||
|
|
||||||
@@ -588,13 +588,18 @@ use Kiri\Router\Annotate\AutoController;
|
|||||||
}
|
}
|
||||||
$this->rules[$val['Field']] = $_field;
|
$this->rules[$val['Field']] = $_field;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$path = str_replace('Controller', 'Form', $path['path']);
|
||||||
if (!is_dir($_SERVER['PWD'] . '/app/Form/')) {
|
if (!is_dir($_SERVER['PWD'] . '/app/Form/')) {
|
||||||
mkdir($_SERVER['PWD'] . '/app/Form/');
|
mkdir($_SERVER['PWD'] . '/app/Form/');
|
||||||
}
|
}
|
||||||
if (!file_exists($_SERVER['PWD'] . '/app/Form/' . $formClass . 'Form.php')) {
|
if (!is_dir($path)) {
|
||||||
touch($_SERVER['PWD'] . '/app/Form/' . $formClass . 'Form.php');
|
mkdir($path);
|
||||||
}
|
}
|
||||||
file_put_contents($_SERVER['PWD'] . '/app/Form/' . $formClass . 'Form.php', '<?php
|
if (!file_exists($path . '/' . $formClass . 'Form.php')) {
|
||||||
|
touch($path . '/' . $formClass . 'Form.php');
|
||||||
|
}
|
||||||
|
file_put_contents($path . '/' . $formClass . 'Form.php', '<?php
|
||||||
|
|
||||||
namespace App\Form;
|
namespace App\Form;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user