Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Added new stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
atehnix committed Jun 13, 2017
1 parent b230b6d commit df52645
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/Console/MailMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ class MailMakeCommand extends BaseMailMakeCommand
*/
protected function getStub()
{
$stub = config('stubs.path').'/mail.stub';
if ($this->option('markdown')) {
$stub = config('stubs.path').'/markdown-mail.stub';
} else {
$stub = config('stubs.path').'/mail.stub';
}

return file_exists($stub) ? $stub : parent::getStub();
}
Expand Down
6 changes: 5 additions & 1 deletion src/Console/NotificationMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ class NotificationMakeCommand extends BaseNotificationMakeCommand
*/
protected function getStub()
{
$stub = config('stubs.path').'/notification.stub';
if ($this->option('markdown')) {
$stub = config('stubs.path').'/markdown-notification.stub';
} else {
$stub = config('stubs.path').'/notification.stub';
}

return file_exists($stub) ? $stub : parent::getStub();
}
Expand Down
3 changes: 3 additions & 0 deletions src/Console/StubsPublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,16 @@ class StubsPublishCommand extends Command
'Illuminate/Foundation/Console/stubs/listener.stub',
'Illuminate/Foundation/Console/stubs/listener-queued.stub',
'Illuminate/Foundation/Console/stubs/mail.stub',
'Illuminate/Foundation/Console/stubs/markdown-mail.stub',
'Illuminate/Foundation/Console/stubs/model.stub',
'Illuminate/Foundation/Console/stubs/notification.stub',
'Illuminate/Foundation/Console/stubs/markdown-notification.stub',
'Illuminate/Foundation/Console/stubs/policy.plain.stub',
'Illuminate/Foundation/Console/stubs/policy.stub',
'Illuminate/Foundation/Console/stubs/provider.stub',
'Illuminate/Foundation/Console/stubs/request.stub',
'Illuminate/Foundation/Console/stubs/test.stub',
'Illuminate/Foundation/Console/stubs/unit-test.stub',
'Illuminate/Routing/Console/stubs/controller.plain.stub',
'Illuminate/Routing/Console/stubs/controller.model.stub',
'Illuminate/Routing/Console/stubs/controller.stub',
Expand Down
6 changes: 5 additions & 1 deletion src/Console/TestMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ class TestMakeCommand extends BaseTestMakeCommand
*/
protected function getStub()
{
$stub = config('stubs.path').'/test.stub';
if ($this->option('unit')) {
$stub = config('stubs.path').'/unit-test.stub';
} else {
$stub = config('stubs.path').'/test.stub';
}

return file_exists($stub) ? $stub : parent::getStub();
}
Expand Down

0 comments on commit df52645

Please sign in to comment.