class AssetController

Asset Controller.

Serves static assets (JS/CSS) and dynamic Ziggy routes for the specific UI requirements. Useful when assets are not published or when delivering dynamic content.

Methods

BinaryFileResponse
beartropyAssets(string $file)

Serve a Beartropy UI static asset.

Response
ziggy()

Serve the Ziggy route list as a JavaScript file.

Details

at line 26
BinaryFileResponse beartropyAssets(string $file)

Serve a Beartropy UI static asset.

Validates extension and file type before serving.

Parameters

string $file

The filename including extension.

Return Value

BinaryFileResponse

Exceptions

HttpException

at line 71
Response ziggy()

Serve the Ziggy route list as a JavaScript file.

Generates the JS, strips script tags, wraps it in a closure, and serves it with appropriate headers.

Return Value

Response

Exceptions

HttpException