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:
namespace App\Filament\Pages;

use Filament\Pages\SimplePage;

class TransportOrder extends SimplePage
{
protected static string $view = 'filament.pages.transport-order';
}
namespace App\Filament\Pages;

use Filament\Pages\SimplePage;

class TransportOrder extends SimplePage
{
protected static string $view = 'filament.pages.transport-order';
}
My blade file
<x-filament-panels::page.simple>

</x-filament-panels::page.simple>
<x-filament-panels::page.simple>

</x-filament-panels::page.simple>
My routes web.php
use App\Http\Controllers\OrderController;
use App\Http\Controllers\OrderTransporterController;
use Illuminate\Support\Facades\Route;
use App\Filament\Pages\TransportOrder;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

Route::get('transportorder', [TransportOrder::class, 'render'])->name('transportOrder');
use App\Http\Controllers\OrderController;
use App\Http\Controllers\OrderTransporterController;
use Illuminate\Support\Facades\Route;
use App\Filament\Pages\TransportOrder;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

Route::get('transportorder', [TransportOrder::class, 'render'])->name('transportOrder');
What am I doing wrong?
5 Replies
christmex
christmex6mo ago
Hi, you can create custom page using filament artisan,
php artisan make:filament:page
php artisan make:filament:page
so you dont need to register it in web.php and it will add automaticlly to the navigation
Luukd_2000
Luukd_2000OP6mo ago
How can I create a simple page with this command?
Tetracyclic
Tetracyclic6mo ago
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)
Luukd_2000
Luukd_2000OP6mo ago
@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?
Tetracyclic
Tetracyclic6mo ago
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';
Want results from more Discord servers?
Add your server