Gdn_Plugin::getWebResource PHP Method

getWebResource() public method

Get a static resource for this addon suitable to be served from the browser.
public getWebResource ( string $filePath, boolean $withDomain = false ) : string
$filePath string The plugin-relative path of the resource.
$withDomain boolean Whether or not to include the domain.
return string Returns the URL of the resource.
    public function getWebResource($filePath, $withDomain = false)
    {
        $assetPath = $this->getResource($filePath, false, false);
        $result = asset($assetPath, $withDomain);
        return $result;
    }