if (! function_exists('is_panel_auth_route')) {
function is_panel_auth_route(): bool
{
$authRoutes = [
'/login',
'/password-reset',
'/register',
'/email-verification',
];
return Str::of(Request::path())->contains($authRoutes);
}
}
if (! is_panel_auth_route()) {
FilamentView::registerRenderHook(
name: 'panels::body.end',
fn (): string => Blade::render('@vite("resources/js/my-script.js")')
);
}
if (! function_exists('is_panel_auth_route')) {
function is_panel_auth_route(): bool
{
$authRoutes = [
'/login',
'/password-reset',
'/register',
'/email-verification',
];
return Str::of(Request::path())->contains($authRoutes);
}
}
if (! is_panel_auth_route()) {
FilamentView::registerRenderHook(
name: 'panels::body.end',
fn (): string => Blade::render('@vite("resources/js/my-script.js")')
);
}