getAssetURL($filename)
Generate the URL for any static assets that live in the theme’s assets directory.
Usage
site()->getAssetURL($filename);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
$filename | string | Yes | Location of an asset relative to the assets/ folder |
Returns
| Type | Description |
|---|---|
string | Absolute URL of the asset |
Example
Check out the guide on theme assets for a couple examples.