Flux facade provides a convenient static interface to access the FluxManager instance and its methods.
Overview
The Flux facade is a Laravel facade that proxies method calls to the underlyingFluxManager class. It provides access to utility methods for managing Flux components, scripts, styles, and more.
Methods
All methods from the FluxManager class are accessible through this facade.classes()
Create a class builder instance for constructing CSS class strings.Optional CSS classes to initialize the builder with
ClassBuilder instance
Example:
pro()
Check if Flux Pro is installed.true if Flux Pro is installed, false otherwise
Example:
scripts()
Generate the Flux JavaScript script tag.Configuration options for the script tagOptions:
nonce(string): CSP nonce value for the script tag
fluxAppearance()
Generate the Flux appearance management script and styles.Configuration optionsOptions:
nonce(string): CSP nonce value for inline scripts and styles
editorStyles()
Generate the Flux editor CSS link tag (Flux Pro only).editorScripts()
Generate the Flux editor JavaScript script tag (Flux Pro only).splitAttributes()
Split an attribute bag into two bags based on attribute names.The attribute bag to split
Array of attribute names to split by
If true, uses exact matching. If false, uses startsWith matching
[matched, unmatched]
Example:
forwardedAttributes()
Extract specific attributes from an attribute bag for forwarding to nested components.The attribute bag to extract from
Array of prop keys to extract (supports both camelCase and kebab-case)
componentExists()
Check if a Flux component exists.The component name to check
true if the component exists, false otherwise
Example:
Related
- FluxManager - The underlying manager class
- AssetManager - Asset management functionality