Caffeinated\Themes\Themes::asset PHP Method

asset() public method

Generate a HTML link to the given asset using HTTP for the currently active theme.
public asset ( $asset ) : string
return string
    public function asset($asset)
    {
        $segments = explode('::', $asset);
        $theme = null;
        if (count($segments) == 2) {
            list($theme, $asset) = $segments;
        } else {
            $asset = $segments[0];
        }
        return url($this->config->get('themes.paths.base') . '/' . ($theme ?: $this->getActive()) . '/' . $this->config->get('themes.paths.assets') . '/' . $asset);
    }