Back

Using FluxUI inside Filament Panel? (in order to benefit from Flux inside custom pages or components) Without publishing views? I think there is a trick in a ServiceProvider, but do you recommend another way?

use Illuminate\Support\Facades\Blade;
use Filament\Facades\Filament;

public function boot(): void
{
$this->bootFilament();
}

private function bootFilament(): void
{
Filament::serving(function () {
FilamentView::registerRenderHook(
PanelsRenderHook::STYLES_AFTER,
fn() => Blade::render('@fluxStyles xx')
);

FilamentView::registerRenderHook(
PanelsRenderHook::SCRIPTS_AFTER,
fn() => Blade::render('@fluxScripts')
);
});
}

1

99