add excel extension

This commit is contained in:
Omair Saleh
2022-10-19 10:37:43 +08:00
parent 2f1164d606
commit dbf61d3a77
@@ -66,6 +66,7 @@ class FileObject implements DataTransferObject
*/
public function getDecodedData(): string
{
dd(in_array($this->getExtension(), ['pdf', 'excel']));
return in_array($this->getExtension(), ['pdf', 'excel']) ?
base64_decode((explode('base64,', $this->getData()))[1]):
$this->getData()->encode('data-url')->encoded;