File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed
Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments