This commit is contained in:
Kekskurse 2021-01-15 23:05:38 +01:00
parent cb47ba4160
commit 7dab146c49

View file

@ -15,7 +15,7 @@ class CalculateSpace extends Command
* *
* @var string * @var string
*/ */
protected $signature = 'calculate:space'; protected $signature = 'calculate:space {--day=}';
/** /**
* The console command description. * The console command description.
@ -41,7 +41,11 @@ class CalculateSpace extends Command
*/ */
public function handle() public function handle()
{ {
$day = $this->argument('day');;
if(empty($day)) {
$day = date("Y-m-d"); $day = date("Y-m-d");
}
$this->info("Calculate Day: ".$day); $this->info("Calculate Day: ".$day);
$galleries = Gallery::query()->get(); $galleries = Gallery::query()->get();
for ($i = 0; $i < 24; $i++) { for ($i = 0; $i < 24; $i++) {