© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
5 replies
Jon Mason

getResource method does not exist

I'm trying to use a Page class and the InteractsWithRecord trait, but I'm getting an error saying the getResource method doesn't exist. What am I doing wrong? Do I have to define this method in my class? The docs didn't mention anything about that.

class Detail extends Page
{
    use InteractsWithRecord;

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

    protected static string $view = 'filament.app.pages.location.detail';

    protected static ?string $title = 'Details';

    protected static ?string $slug = 'location/{record}/detail';

    protected static bool $shouldRegisterNavigation = false;

    public function mount(int | string $record): void
    {
        $this->record = $this->resolveRecord($record);
    }

    ...
}
class Detail extends Page
{
    use InteractsWithRecord;

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

    protected static string $view = 'filament.app.pages.location.detail';

    protected static ?string $title = 'Details';

    protected static ?string $slug = 'location/{record}/detail';

    protected static bool $shouldRegisterNavigation = false;

    public function mount(int | string $record): void
    {
        $this->record = $this->resolveRecord($record);
    }

    ...
}
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

lineClamp() method does not exist.
FilamentFFilament / ❓┊help
2y ago
import Action method examples does not exist.
FilamentFFilament / ❓┊help
2y ago
Method Filament\Panel::databaseTransactions does not exist.
FilamentFFilament / ❓┊help
2y ago
Method Filament\Panel::assets does not exist.
FilamentFFilament / ❓┊help
2y ago