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.
3 Replies
I think I was extending the wrong Page class. I fixed that, but now I'm getting
Filament\Resources\Pages\Page::$resource must not be accessed before initialization
It's coming from this sidebar class I have that basically only shows menu items once a location is selected:
It doesn't like that last url()
bit.try wrapping it in a function
Ok, It seems that extending
Filament/Resources/Pages/Page
makes the initial issue work, but then getUrl was giving an error saying the first parameter was a string and was expecting an array. Changing it to extend Filament/Pages/Page
fixes the getUrl issue, but then I get the getResource method doesnt' exist again. So lost..