From a194c7782d142345f503ff759188c4828ae1dc90 Mon Sep 17 00:00:00 2001 From: Mohammad Alavi Date: Sun, 8 Dec 2024 17:27:20 +0330 Subject: [PATCH] feat: pass model name --- src/Generator/Commands/ContainerApiGenerator.php | 2 ++ src/Generator/Commands/ContainerWebGenerator.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Generator/Commands/ContainerApiGenerator.php b/src/Generator/Commands/ContainerApiGenerator.php index 90a3fddd..2e206fac 100644 --- a/src/Generator/Commands/ContainerApiGenerator.php +++ b/src/Generator/Commands/ContainerApiGenerator.php @@ -336,6 +336,7 @@ public function getUserInputs(): array|null '--section' => $sectionName, '--container' => $containerName, '--file' => $route['controller'], + '--model' => $model, '--ui' => $ui, '--stub' => $route['stub'], ]); @@ -360,6 +361,7 @@ public function getUserInputs(): array|null $this->call('apiato:generate:controller', [ '--section' => $sectionName, '--container' => $containerName, + '--model' => $model, '--file' => 'Controller', '--ui' => $ui, '--stub' => 'crud', diff --git a/src/Generator/Commands/ContainerWebGenerator.php b/src/Generator/Commands/ContainerWebGenerator.php index 86d27d7e..c8b8077b 100644 --- a/src/Generator/Commands/ContainerWebGenerator.php +++ b/src/Generator/Commands/ContainerWebGenerator.php @@ -251,6 +251,7 @@ public function getUserInputs(): array|null '--section' => $sectionName, '--container' => $containerName, '--file' => $route['controller'], + '--model' => $model, '--ui' => $ui, '--stub' => $route['stub'], ]); @@ -276,6 +277,7 @@ public function getUserInputs(): array|null '--section' => $sectionName, '--container' => $containerName, '--file' => 'Controller', + '--model' => $model, '--ui' => $ui, '--stub' => 'crud', ]);