API Documentation

AssetService
in package

Handles the retrieval of core asset files. Commonly used through the Asset facade.

This class is loaded into the service container, making it easy to access and modify.

The class also provides helper methods for interacting with versioned files, as well as the HydeFront CDN service and the media directories.

Tags
see
Asset

Table of Contents

Constants

HYDEFRONT_CDN_URL  = 'https://cdn.jsdelivr.net/npm/hydefront@{{ $version }}/dist/{{ $file }}'
HYDEFRONT_VERSION  = 'v3.4'

Properties

$cdnUrl  : string
$version  : string

Methods

__construct()  : mixed
cdnLink()  : string
hasMediaFile()  : bool
injectTailwindConfig()  : string
mediaLink()  : string
version()  : string
constructCdnPath()  : string
getCacheBustKey()  : string

Constants

HYDEFRONT_CDN_URL

public final string HYDEFRONT_CDN_URL = 'https://cdn.jsdelivr.net/npm/hydefront@{{ $version }}/dist/{{ $file }}'

The default HydeFront CDN path pattern. The Blade-style placeholders are replaced with the proper values.

HYDEFRONT_VERSION

public final string HYDEFRONT_VERSION = 'v3.4'

The default HydeFront SemVer tag to load. This constant is set to match the styles used for the installed framework version.

Properties

$cdnUrl

protected string $cdnUrl = self::HYDEFRONT_CDN_URL

$version

protected string $version = self::HYDEFRONT_VERSION

Methods

public cdnLink(string $file) : string
Parameters
$file : string
Return values
string

hasMediaFile()

public hasMediaFile(string $file) : bool
Parameters
$file : string
Return values
bool

injectTailwindConfig()

public injectTailwindConfig() : string
Return values
string
public mediaLink(string $file) : string
Parameters
$file : string
Return values
string

version()

public version() : string
Return values
string

constructCdnPath()

protected constructCdnPath(string $file) : string
Parameters
$file : string
Return values
string

getCacheBustKey()

protected getCacheBustKey(string $file) : string
Parameters
$file : string
Return values
string

        
On this page

Search results