Skip to content

Commit 46fb4b6

Browse files
scott graysonscott grayson
authored andcommitted
Publish CSS as public asset instead of inline
- CSS now publishes to public/vendor/filament-help/help.css - Changed from file_get_contents() to asset() link - Fixes 'file not found' error with compiled Blade views - Standard Laravel package asset publishing approach
1 parent 743044d commit 46fb4b6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

resources/views/layouts/help.blade.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
@endif
2626

2727
{{-- Package CSS for help pages (prose styles, iframe styling) --}}
28-
<style>
29-
{!! file_get_contents(__DIR__ . '/../../css/help.css') !!}
30-
</style>
28+
<link rel="stylesheet" href="{{ asset('vendor/filament-help/help.css') }}">
3129

3230
{{-- App CSS from config (Tailwind and custom styles) --}}
3331
@vite(config('filament-help.css', ['resources/css/app.css']))

src/FilamentHelpServiceProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ public function boot(): void
3535
__DIR__.'/../../resources/views' => resource_path('views/vendor/filament-help'),
3636
], 'filament-help-views');
3737

38+
$this->publishes([
39+
__DIR__.'/../resources/css/help.css' => public_path('vendor/filament-help/help.css'),
40+
], 'filament-help-assets');
41+
3842
// Register the HelpLayout component so it can be used as <x-help-layout>
3943
/** @phpstan-ignore-next-line */
4044
$this->loadViewComponentsAs('', [

0 commit comments

Comments
 (0)