1 | <?php |
||
8 | class MakeTeamwork extends Command |
||
9 | { |
||
10 | |||
11 | use AppNamespaceDetectorTrait; |
||
12 | |||
13 | /** |
||
14 | * The name and signature of the console command. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $signature = 'make:teamwork {--views : Only scaffold the teamwork views}'; |
||
19 | |||
20 | /** |
||
21 | * The console command description. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $description = 'Create Teamwork scaffolding files.'; |
||
26 | |||
27 | protected $views = [ |
||
28 | 'emails/invite.blade.php' => 'teamwork/emails/invite.blade.php', |
||
29 | 'members/list.blade.php' => 'teamwork/members/list.blade.php', |
||
30 | 'create.blade.php' => 'teamwork/create.blade.php', |
||
31 | 'edit.blade.php' => 'teamwork/edit.blade.php', |
||
32 | 'index.blade.php' => 'teamwork/index.blade.php', |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * Create a new command instance. |
||
37 | * |
||
38 | * @return void |
||
|
|||
39 | */ |
||
40 | public function __construct() |
||
44 | |||
45 | /** |
||
46 | * Execute the console command. |
||
47 | * |
||
48 | * @return mixed |
||
49 | */ |
||
50 | public function handle() |
||
94 | |||
95 | /** |
||
96 | * Create the directories for the files. |
||
97 | * |
||
98 | * @return void |
||
99 | */ |
||
100 | protected function createDirectories() |
||
118 | |||
119 | /** |
||
120 | * Export the authentication views. |
||
121 | * |
||
122 | * @return void |
||
123 | */ |
||
124 | protected function exportViews() |
||
132 | |||
133 | /** |
||
134 | * Compiles the HTTP controller stubs. |
||
135 | * |
||
136 | * @param $stubName |
||
137 | * @return string |
||
138 | */ |
||
139 | protected function compileControllerStub($stubName) |
||
147 | } |
||
148 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.