变更
This commit is contained in:
+2
-1
@@ -589,6 +589,7 @@ use Kiri\Router\Annotate\AutoController;
|
|||||||
$this->rules[$val['Field']] = $_field;
|
$this->rules[$val['Field']] = $_field;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$namespace = str_replace('Controller', 'Form', $path['namespace']);
|
||||||
$path = str_replace('Controller', 'Form', $path['path']);
|
$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/');
|
||||||
@@ -601,7 +602,7 @@ use Kiri\Router\Annotate\AutoController;
|
|||||||
}
|
}
|
||||||
file_put_contents($path . '/' . $formClass . 'Form.php', '<?php
|
file_put_contents($path . '/' . $formClass . 'Form.php', '<?php
|
||||||
|
|
||||||
namespace App\Form;
|
namespace ' . $namespace . ';
|
||||||
|
|
||||||
use Kiri\ToArray;
|
use Kiri\ToArray;
|
||||||
' . implode(PHP_EOL, $header) . PHP_EOL . PHP_EOL . '
|
' . implode(PHP_EOL, $header) . PHP_EOL . PHP_EOL . '
|
||||||
|
|||||||
Reference in New Issue
Block a user