Filament Simple Page Route Returning 404
Help Needed: Filament Simple Page Route Returning 404
Hi everyone,
I'm trying to create a simple page using Filament in my Laravel application, but I'm encountering a 404 error when I navigate to the route. Here's what I have so far:
My blade file
My routes web.php
What am I doing wrong?
5 Replies
Hi, you can create custom page using filament artisan,
so you dont need to register it in web.php and it will add automaticlly to the navigation
How can I create a simple page with this command?
Hey @Luukd_2000
Once you've created the page you can configure the URL using the
$slug
attribute: https://filamentphp.com/docs/3.x/panels/pages#customizing-the-page-url
Filament will take care of the routing from within the panel that page exists on.
If you want to use Filament components (forms, tables) outside a panel, you can create a page with Livewire and then follow the installation instructions on each of the docs sections to integrate them (https://filamentphp.com/docs/3.x/forms/installation, for example)@Tetracyclic Thanks for the reply but it seems that when I change the Page class to SimplePage, Filament isnt registering the page anymore. Is there a manual for how to create a simple page?
SimplePage
extends BasePage
directly, and doesn't include the logic from Page
that handles registering the navigation items or routes as it's designed to exist outside of the panels/auth
Are you using a SimplePage
just for the layout?
If so, it should work to just have a Page
and replace the $layout
property with the one from SimplePage
:
protected static string $layout = 'filament-panels::components.layout.simple';