Skip to content

Commit 9f22125

Browse files
committed
fix theme registration
1 parent 2a674b5 commit 9f22125

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
@php
2+
Filament\Facades\Filament::registerRenderHook(
3+
'styles.end',
4+
fn () => new '<link href="' . mix('css/app.css') . '" rel="stylesheet" />',
5+
);
6+
@endphp
7+
18
<x-filament::layouts.card title="Unauthorized">
29
Your account is not authorized to perform this action.
310
</x-filament::layouts.card>

src/MailCarrierServiceProvider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ class MailCarrierServiceProvider extends PluginServiceProvider
4040
*/
4141
public function packageConfiguring(Package $package): void
4242
{
43-
if (!$this->app->runningInConsole()) {
44-
Filament::registerTheme(mix('css/app.css'));
45-
}
46-
4743
Event::listen(ServingFilament::class, $this->servingFilament(...));
4844
}
4945

@@ -111,6 +107,8 @@ public function packageBooted(): void
111107
*/
112108
public function servingFilament(): void
113109
{
110+
Filament::registerTheme(mix('css/app.css'));
111+
114112
// Edit the navigation
115113
Filament::navigation(
116114
fn (NavigationBuilder $builder): NavigationBuilder => $builder

0 commit comments

Comments
 (0)