Skip to content

Commit

Permalink
Allow migration schema stubs to be overwritten since they are exporte…
Browse files Browse the repository at this point in the history
…d, but do nothing if changed
  • Loading branch information
markcameron committed Sep 9, 2015
1 parent a4f247b commit db751b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Migrations/SyntaxBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}

/**
Expand All @@ -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'));
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
];

0 comments on commit db751b4

Please sign in to comment.