diff --git a/src/Migrations/SyntaxBuilder.php b/src/Migrations/SyntaxBuilder.php index 3ed8f4a..9bdd79c 100644 --- a/src/Migrations/SyntaxBuilder.php +++ b/src/Migrations/SyntaxBuilder.php @@ -133,7 +133,7 @@ private function into($wrapper, $placeholder = 'schema_up') */ private function getCreateSchemaWrapper() { - return file_get_contents(__DIR__ . '/../../resources/stubs/schema-create.stub'); + return file_get_contents(config('generators.schema_create_stub')); } /** @@ -143,7 +143,7 @@ private function getCreateSchemaWrapper() */ private function getChangeSchemaWrapper() { - return file_get_contents(__DIR__ . '/../../resources/stubs/schema-change.stub'); + return file_get_contents(config('generators.schema_change_stub')); } /** diff --git a/src/config/config.php b/src/config/config.php index b61366f..676122d 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -78,4 +78,8 @@ 'view_add_edit_stub' => base_path() . '/vendor/bpocallaghan/generators/resources/stubs/view.add_edit.stub', 'view_show_stub' => base_path() . '/vendor/bpocallaghan/generators/resources/stubs/view.show.stub', + + 'schema_create_stub' => base_path() . '/vendor/bpocallaghan/generators/resources/stubs/schema-create.stub', + + 'schema_change_stub' => base_path() . '/vendor/bpocallaghan/generators/resources/stubs/schema-change.stub', ];