Skip to content

Commit b912361

Browse files
committed
hhmm... missed to commit the AllCommand
1 parent 7615a9a commit b912361

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php
2+
3+
namespace Rabol\LaravelSetupLocalDev\Console\Commands;
4+
5+
use Illuminate\Console\Command;
6+
7+
class AllCommand extends Command
8+
{
9+
/**
10+
* The name and signature of the console command.
11+
*
12+
* @var string
13+
*/
14+
protected $signature = 'setuplocaldev:all { --file_env= : Read env vars from this file.}{ --file_tasks= : Read tasks from this file.}';
15+
16+
/**
17+
* The console command description.
18+
*
19+
* @var string
20+
*/
21+
protected $description = 'Execute all \'Setup local dev\' commands';
22+
23+
/**
24+
* Create a new command instance.
25+
*
26+
* @return void
27+
*/
28+
public function __construct()
29+
{
30+
parent::__construct();
31+
}
32+
33+
/**
34+
* Execute the console command.
35+
*
36+
* @return mixed
37+
*/
38+
public function handle()
39+
{
40+
if($this->option('file_env'))
41+
{
42+
$this->call('setuplocaldev:setenv',['--file' => $this->option('file_env')]);
43+
}
44+
else
45+
{
46+
$this->call( 'setuplocaldev:setenv');
47+
}
48+
49+
if($this->option('file_tasks'))
50+
{
51+
$this->call( 'setuplocaldev:commontasks',['--file' => $this->option('file_tasks')]);
52+
}
53+
else
54+
{
55+
$this->call( 'setuplocaldev:commontasks');
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)