Skip to content

Commit

Permalink
Move default filename to the tag
Browse files Browse the repository at this point in the history
  • Loading branch information
aerni committed Oct 16, 2020
1 parent 137bb1d commit 4c5db68
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/Zipper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public function __construct()
{
$this->zip = new ZipArchive();
$this->disk = Storage::disk(config('zipper.disk'));
$this->filename = time() . '.zip';
}

public function disk(string $disk): self
Expand Down
2 changes: 1 addition & 1 deletion src/ZipperTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function wildcard()
{
return (new Zipper())
->files($this->context->get($this->method)->value())
->filename($this->params->get('filename'))
->filename($this->params->get('filename') ?? time())
->save()
->url();
}
Expand Down

0 comments on commit 4c5db68

Please sign in to comment.