filament/filament
v3.2.108
v10.48.20
v3.5.6
PHP 8.3
I'm not exactly sure how to describe this but I'll try my best.
When I'm extending a filament Resource class that is under namespace "App" from a resource class that is under "AppTest" and register it in my panel everything works as expected. Hovewer, when I try to extend the same resource that is in a cluster the routes for the pages (list, edit, create etc) are not registered for the panel under "AppTest"
This is the resource I'm trying to extend, mind you this resource is not registered with any panels
app/Filament/Resources/TagResource.php
<?php
namespace App\Filament\Resources;
use App\Filament\Resources\TagResource\Pages;
use App\Models\Tag;
use Filament\Resources\Resource;
class TagResource extends Resource
{
protected static ?string $model = Tag::class;
public static function getPages(): array
{
return [
'index' => Pages\ListTags::route('/'),
'create' => Pages\CreateTag::route('/create'),
'edit' => Pages\EditTag::route('/{record}/edit'),
];
}
}
This is where I'm trying to extend it
apptest/Filament/Clusters/Settings/Resources/TagResource.php
<?php
namespace AppTest\Filament\Clusters\Settings\Resources;
use App\Filament\Resources\TagResource as BaseTagResource;
use AppTest\Filament\Clusters\Settings;
// This will throw an error beacuse of the missing routes
class TagResource extends BaseTagResource
{
protected static ?string $cluster = Settings::class;
}
I'd expect that resource classes under clusters behave the same way when they are not in a cluster regarding class extending.
php artisan migrate
/test/settings/tags
Route [filament.test.resources.tags.index] not defined.
look for FBUG:
in the provided repo to play around
https://github.com/TKrisee/filament-bugs
Route [filament.test.resources.tags.index] not defined.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too