瀏覽代碼

修复laravel9.x中代码生成器报错问题

jqh 3 年之前
父節點
當前提交
56d62aa85f
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/Scaffold/MigrationCreator.php

+ 3 - 3
src/Scaffold/MigrationCreator.php

@@ -42,10 +42,10 @@ class MigrationCreator extends BaseMigrationCreator
 
         $stub = $this->files->get(__DIR__.'/stubs/create.stub');
 
-        $this->files->put($path, $this->populateStub($name, $stub, $table));
+        $this->files->put($path, $this->populateAdminStub($name, $stub, $table));
         $this->files->chmod($path, 0777);
 
-        $this->firePostCreateHooks($table);
+        $this->firePostCreateHooks($table, $path);
 
         return $path;
     }
@@ -58,7 +58,7 @@ class MigrationCreator extends BaseMigrationCreator
      * @param  string  $table
      * @return mixed
      */
-    protected function populateStub($name, $stub, $table)
+    protected function populateAdminStub($name, $stub, $table)
     {
         return str_replace(
             ['DummyClass', 'DummyTable', 'DummyStructure'],