Stuff
This commit is contained in:
parent
33bc29d39c
commit
510bca3666
1 changed files with 1 additions and 0 deletions
|
@ -57,6 +57,7 @@ class CalculateSpace extends Command
|
||||||
$end = $day." ".$i.":59:59";
|
$end = $day." ".$i.":59:59";
|
||||||
$sql = "SELECT SUM(size) AS size FROM images WHERE gallery = ".$gallery->id." AND uploaded_at < \"".$start."\" AND (deleted_at > \"".$end."\" OR deleted_at IS NULL);";
|
$sql = "SELECT SUM(size) AS size FROM images WHERE gallery = ".$gallery->id." AND uploaded_at < \"".$start."\" AND (deleted_at > \"".$end."\" OR deleted_at IS NULL);";
|
||||||
$size = DB::select($sql)[0]->size;
|
$size = DB::select($sql)[0]->size;
|
||||||
|
$this->info("Size: ".$size);
|
||||||
$split = explode("-", $day);
|
$split = explode("-", $day);
|
||||||
$storage = \App\Models\Storage::query()
|
$storage = \App\Models\Storage::query()
|
||||||
->where("gallery", "=", $gallery->id)
|
->where("gallery", "=", $gallery->id)
|
||||||
|
|
Loading…
Reference in a new issue