getAssetURL($filename)

Generate the URL for any static assets that live in the theme’s assets directory.

Usage

site()->getAssetURL($filename);

Parameters

ParameterTypeRequiredDescription
$filenamestringYesLocation of an asset relative to the assets/ folder

Returns

TypeDescription
stringAbsolute URL of the asset

Example

Check out the guide on theme assets for a couple examples.