Issue With Custom Filament Page Route

Hi I have created custom Filament Page
<?php

declare(strict_types=1);

namespace App\Filament\Pages\SOC;

use App\Facades\System\Utils;
use App\Helpers\Filament\FormInputsBuilder;
use App\Models\SOC\Disaster as DisasterModel;
use Filament\Forms\Form;
use Filament\Pages\Page;
use Illuminate\Contracts\Support\Htmlable;

class PreviewDisaster extends Page
{
public ?DisasterModel $disaster = null;

public bool $canEdit = false;

protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.s-o-c.preview-disaster';

protected static bool $shouldRegisterNavigation = false;

protected static ?string $slug = 'service-operation-center/disaster/preview/{disaster_id}';

etc.....
<?php

declare(strict_types=1);

namespace App\Filament\Pages\SOC;

use App\Facades\System\Utils;
use App\Helpers\Filament\FormInputsBuilder;
use App\Models\SOC\Disaster as DisasterModel;
use Filament\Forms\Form;
use Filament\Pages\Page;
use Illuminate\Contracts\Support\Htmlable;

class PreviewDisaster extends Page
{
public ?DisasterModel $disaster = null;

public bool $canEdit = false;

protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.s-o-c.preview-disaster';

protected static bool $shouldRegisterNavigation = false;

protected static ?string $slug = 'service-operation-center/disaster/preview/{disaster_id}';

etc.....
But i am constantly getting that rhat route is not defiend, even tough when i do php artisan route:list that route is there.. Did anyone have that problem?
3 Replies
AlexDev
AlexDev3w ago
did you try php artisan optimize first?
Dennis Koch
Dennis Koch3w ago
Where did you get that error and how are you using the route? Page::getUrl()?
toeknee
toeknee3w ago
Going to guess it's the slug container 'disaster_id'

Did you find this page helpful?