1 <?php
2
3 namespace Scaffolder\Commands;
4
5 use Illuminate\Console\Command;
6 use Illuminate\Support\Facades\Cache;
7
8 abstract class BaseCommand extends Command
9 {
10 11 12 13 14 15
16 protected function writeStatus($status, $webExecution)
17 {
18 if ($webExecution)
19 {
20 $cachedStatus = unserialize(Cache::get('scaffolder-status'));
21 array_push($cachedStatus, $status);
22 Cache::forever('scaffolder-status', serialize($cachedStatus));
23 }
24 else
25 {
26 $this->info($status);
27 }
28 }
29 }
30