| @@ 50-69 (lines=20) @@ | ||
| 47 | * |
|
| 48 | * @return void |
|
| 49 | */ |
|
| 50 | public function handle(): void |
|
| 51 | { |
|
| 52 | try { |
|
| 53 | $adapter = Storage::disk($this->option('disk'))->getAdapter(); |
|
| 54 | ||
| 55 | if ($adapter instanceof CachedAdapter) { |
|
| 56 | $adapter = $adapter->getAdapter(); |
|
| 57 | } |
|
| 58 | ||
| 59 | $this->container = $adapter->getContainer(); |
|
| 60 | } catch (InvalidArgumentException $e) { |
|
| 61 | $this->error($e->getMessage()); |
|
| 62 | ||
| 63 | return; |
|
| 64 | } |
|
| 65 | ||
| 66 | if ($this->hasOption('force') || $this->askIfShouldOverrideExistingParams()) { |
|
| 67 | $this->setHeaders(); |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * If there's no existing Temp URL Key present in the Container, continue. |
|
| @@ 49-68 (lines=20) @@ | ||
| 46 | * |
|
| 47 | * @return void |
|
| 48 | */ |
|
| 49 | public function handle(): void |
|
| 50 | { |
|
| 51 | try { |
|
| 52 | $adapter = Storage::disk($this->option('disk'))->getAdapter(); |
|
| 53 | ||
| 54 | if ($adapter instanceof CachedAdapter) { |
|
| 55 | $adapter = $adapter->getAdapter(); |
|
| 56 | } |
|
| 57 | ||
| 58 | $this->container = $adapter->getContainer(); |
|
| 59 | } catch (InvalidArgumentException $e) { |
|
| 60 | $this->error($e->getMessage()); |
|
| 61 | ||
| 62 | return; |
|
| 63 | } |
|
| 64 | ||
| 65 | if ($this->hasOption('force') || $this->askIfShouldOverrideExistingKey()) { |
|
| 66 | $this->setContainerKey(); |
|
| 67 | } |
|
| 68 | } |
|
| 69 | ||
| 70 | /** |
|
| 71 | * If there's no existing Temp URL Key present in the Container, continue. |
|