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
Table of Contents
Constants
- HYDEFRONT_CDN_URL = 'https://cdn.jsdelivr.net/npm/hydefront@{{ $version }}/dist/{{ $file }}'
- HYDEFRONT_VERSION = 'v3.4'
Properties
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
__construct()
public
__construct() : mixed
cdnLink()
public
cdnLink(string $file) : string
Parameters
- $file : string
Return values
stringhasMediaFile()
public
hasMediaFile(string $file) : bool
Parameters
- $file : string
Return values
boolinjectTailwindConfig()
public
injectTailwindConfig() : string
Return values
stringmediaLink()
public
mediaLink(string $file) : string
Parameters
- $file : string
Return values
stringversion()
public
version() : string
Return values
stringconstructCdnPath()
protected
constructCdnPath(string $file) : string
Parameters
- $file : string
Return values
stringgetCacheBustKey()
protected
getCacheBustKey(string $file) : string
Parameters
- $file : string