diff examples/ExampleGenerator.php.stub @ 3:6468684362c2

It works! Created a controller, no update insert but it works
author luka
date Tue, 27 Jun 2023 15:32:47 -0400
parents cf9993c5c7df
children a20439b1c9d3
line wrap: on
line diff
--- a/examples/ExampleGenerator.php.stub	Sun Jun 25 14:45:15 2023 -0400
+++ b/examples/ExampleGenerator.php.stub	Tue Jun 27 15:32:47 2023 -0400
@@ -39,37 +39,7 @@
      */
     public function handle()
     {
-
-
-        // First we need to ensure that the table exists, then we can
-        if (! $this->tableExists($this->getTableInput())) {
-            $this->components->error('The table: "'.$this->getTableInput().'" does not exist in the database.');
-
-            return false;
-        }
-
-        $name = $this->qualifyClass($this->getTableInput());
-
-        $path = $this->getPath($name);
-
-        $file = $this->getFile($name);
-
-        // Next, we will generate the path to the location where this class' file should get
-        // written. Then, we will build the class and make the proper replacements on the
-        // file so that it gets the correctly formatted namespace and class name.
-        $this->makeDirectory($path);
-
-        $this->files->put($path, $this->sortImports($this->buildClass($name)));
-
-        $info = $this->type;
-
-        if (in_array(CreatesMatchingTest::class, class_uses_recursive($this))) {
-            if ($this->handleTestCreation($path)) {
-                $info .= ' and test';
-            }
-        }
-
-        $this->components->info(sprintf('%s [%s] created successfully.', $info, $path));
+			parent::handle();
     }
 
     /**