Skip to content

Commit

Permalink
Auto stash before checking out "origin/main"
Browse files Browse the repository at this point in the history
  • Loading branch information
halilcosdu committed Apr 30, 2024
1 parent 11fc7d9 commit 5306e26
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ $log = LogWeaver::description('User registered')

```php
$response = LogWeaver::download(string $path, $name = null, array $headers = []): StreamedResponse;
$response = LogWeaver::delete(string|array $paths): bool;
$response = LogWeaver::get(string $path): bool;
```

## Testing
Expand Down
2 changes: 2 additions & 0 deletions src/Facades/LogWeaver.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* @method static \HalilCosdu\LogWeaver\LogWeaver relation(?array $relation): static
* @method static \HalilCosdu\LogWeaver\LogWeaver log(?string $path = null, bool $wait = false): array
* @method static \HalilCosdu\LogWeaver\LogWeaver download(string $path, $name = null, array $headers = []): StreamedResponse
* @method static \HalilCosdu\LogWeaver\LogWeaver delete(string|array $paths): bool
* @method static \HalilCosdu\LogWeaver\LogWeaver get(string $path): string
* @method array toArray(): array
* @method string toJson($options = 0): false|string
*/
Expand Down
10 changes: 10 additions & 0 deletions src/LogWeaver.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,16 @@ public function download(string $path, $name = null, array $headers = []): Strea
return Storage::disk($this->getDisk())->download($path, $name, $headers);
}

public function get(string $path): string
{
return Storage::disk($this->getDisk())->get($path);
}

public function delete(string|array $paths): bool
{
return Storage::disk($this->getDisk())->delete($paths);
}

/**
* @throws Exception
*/
Expand Down

0 comments on commit 5306e26

Please sign in to comment.