filamentphp/filament · error · LogicException

Please use the `FilamentAsset` facade to register styles. Se

Error message

Please use the `FilamentAsset` facade to register styles. See the documentation - https://filamentphp.com/docs/support/assets#registering-css-files

What it means

Error "Please use the `FilamentAsset` facade to register styles. See the documentation - https://filamentphp.com/docs/support/assets#registering-css-files" thrown in filamentphp/filament.

Source

Thrown at packages/panels/src/FilamentManager.php:1063

    /**
     * @param  array<string, mixed>  $data
     *
     * @deprecated Register script data using the `FilamentAsset` facade instead.
     */
    public function registerScriptData(array $data): void
    {
        FilamentAsset::registerScriptData($data);
    }

    /**
     * @param  array<mixed>  $styles
     *
     * @deprecated Register styles using the `FilamentAsset` facade instead.
     */
    public function registerStyles(array $styles): void
    {
        throw new LogicException('Please use the `FilamentAsset` facade to register styles. See the documentation - https://filamentphp.com/docs/support/assets#registering-css-files');
    }

    /**
     * @deprecated Use the `theme()` method on the panel configuration instead.
     */
    public function registerTheme(string | Htmlable | null $theme): void
    {
        try {
            $this->getDefaultPanel()->theme($theme);
        } catch (NoDefaultPanelSetException $exception) {
            throw new LogicException('Please use the `theme()` method on the panel configuration to register themes.');
        }
    }

    /**
     * @param  string | array<string>  $theme
     *
     * @deprecated Use the `viteTheme()` method on the panel configuration instead.

View on GitHub (pinned to 53483fa934)

When it happens

Trigger: Thrown at packages/panels/src/FilamentManager.php:1063 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of filamentphp/filament@53483fa934 (2026-08-17). Data as JSON: /api/errors/6ecfd0c1e913f2ca. Report an issue: GitHub.