-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathConsoleGenerator.php
More file actions
46 lines (41 loc) · 895 Bytes
/
ConsoleGenerator.php
File metadata and controls
46 lines (41 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace Pingpong\Generators;
class ConsoleGenerator extends Generator
{
/**
* Get stub name.
*
* @var string
*/
protected $stub = 'console';
/**
* Get base path of destination file.
*
* @return string
*/
public function getBasePath()
{
return app_path().'/Console/Commands';
}
/**
* Get root namespace.
*
* @return string
*/
public function getRootNamespace()
{
return $this->getAppNamespace().'Console\\Commands\\';
}
/**
* Get template replacements.
*
* @return array
*/
public function getReplacements()
{
return array_merge(parent::getReplacements(), [
'command' => $this->option('command', 'command:name'),
'description' => $this->option('description', 'Command description'),
]);
}
}