Skip to content

Commit

Permalink
Merge pull request #5 from markcameron/master
Browse files Browse the repository at this point in the history
Small fix for Laravel 5.1 + Schema stubs
  • Loading branch information
bpocallaghan committed Sep 9, 2015
2 parents 54c7d6c + db751b4 commit 85c64d5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/Commands/FileCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
class FileCommand extends GeneratorCommand
{

use \Illuminate\Console\AppNamespaceDetectorTrait;

/**
* The console command name.
*
Expand Down
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 85c64d5

Please sign in to comment.