F
Filament12mo ago
Baspa

Syntax error, unexpected token ";", expecting "]"

I just did a fresh installation and get the following error when redirecting to the link: https://secure-link.test/abc/login The error seems to occur in vendor/filament/support/resources/views/components/modal/index.blade.php. This is my provider, which I included in the app.php config:
<?php

namespace App\Providers\Filament;

// ...

class AbcPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->default()
->id('abc')
->path('abc')
->login()
->colors([
'primary' => Color::Amber,
])
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
])
->authGuard('backend')
->authMiddleware([
Authenticate::class,
]);
}
}
<?php

namespace App\Providers\Filament;

// ...

class AbcPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->default()
->id('abc')
->path('abc')
->login()
->colors([
'primary' => Color::Amber,
])
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
])
->authGuard('backend')
->authMiddleware([
Authenticate::class,
]);
}
}
3 Replies
Baspa
BaspaOP12mo ago
When I comment this code it seems like it's working:
@style([
\Filament\Support\get_color_css_variables(
$iconColor,
shades: [100, 400, 500, 600],
alias: 'modal.icon',
) => $iconColor !== 'gray',
])
@style([
\Filament\Support\get_color_css_variables(
$iconColor,
shades: [100, 400, 500, 600],
alias: 'modal.icon',
) => $iconColor !== 'gray',
])
Dennis Koch
Dennis Koch12mo ago
I don't see a syntax error there. Might be the directive that has the issue?
Baspa
BaspaOP12mo ago
Ah seems like I already had a style directive which conflicts with Filament. So it has nothing to do with Filament itself. Thanks. @Dennis Koch
Want results from more Discord servers?
Add your server