Skip to content

Commit ad61481

Browse files
committed
Adding setExternalUrl to Asset data class
1 parent 7849e3a commit ad61481

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Data/Asset.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ public function updatedAt(): null|string
8989
return $this->getFormattedDateTime('updated_at', "", format: "Y-m-d");
9090
}
9191

92+
public function setExternalUrl($url): self
93+
{
94+
95+
$this->set("filename", $url);
96+
$this->set("is_external_url", true);
97+
return $this;
98+
}
9299
public static function emptyAsset(): Asset
93100
{
94101
return self::make([

0 commit comments

Comments
 (0)