F
Filament7mo ago
Groli

Can not get filament views working in 404 view file

Hi! I have this code in my 404.blade.php file:
<x-filament::card>
<p>Oops! This resource does not exist.</p>
<x-filament::button tag="a" href="{{ route('filament.app.auth.login') }}">Go back</x-filament::button>
</x-filament::card>
<x-filament::card>
<p>Oops! This resource does not exist.</p>
<x-filament::button tag="a" href="{{ route('filament.app.auth.login') }}">Go back</x-filament::button>
</x-filament::card>
What I'm doing wrong? Because I'm only getting this plain response without styling... Do I need to wrap it in something else? Thanks for any help.
No description
Solution:
Then you probably need to create your own layout file that includes Filaments CSS file
Jump to solution
4 Replies
Dennis Koch
Dennis Koch7mo ago
You probably didn't register Filaments stylesheets You can probably use Filaments simple-page as a wrapper
Groli
GroliOP7mo ago
Thanks for that but can you explain me please also what exactly is happening when I wrap the stuff above in a simple page and get this error: Using $this when not in object context. Should I also create some class or what's wrong?
Dennis Koch
Dennis Koch7mo ago
Seems like it needs to be used from within a Livewire component
Solution
Dennis Koch
Dennis Koch7mo ago
Then you probably need to create your own layout file that includes Filaments CSS file

Did you find this page helpful?