sigmarhophi
Custom Page throws error with default code.
What I am trying to do:
Add a custom page.
What I did:
Followed the default instructions on the filamentphp website. https://filamentphp.com/docs/3.x/panels/resources/custom-pages
The command I ran:
art make:filament-page ManageSheets --resource=BinderResource --type=customadded to ManageSheets.php the
use InteractsWithRecord;
line, and the exampled mount entries. See code below.
added a route to my resource file.
'manage' => Pages\ManageSheets::route('/{record}/manage'),added a link which uses the route:
Action::make('Manage') ->url(fn (Binder $record): string => BinderResource::getUrl('manage', ['record' => $record->id])),My issue/the Error: The link resolves, but the ManageSheets.php throws two types of errors. First error: Trait "App\Filament\Binder\Resources\BinderResource\Pages\InteractsWithRecord" not found Second error: App\Filament\Binder\Resources\BinderResource\Pages\ManageSheets::resolveRecord does not exist. I expect the site to load a basic blank page as zero additional customization was done. Here is my page code:
<?php namespace App\Filament\Binder\Resources\BinderResource\Pages; use App\Filament\Binder\Resources\BinderResource; use Filament\Resources\Pages\Page; class ManageSheets extends Page { use InteractsWithRecord; protected static string $resource = BinderResource::class; protected static string $view = 'filament.binder.resources.binder-resource.pages.manage-sheets'; public function mount(int | string $record): void { $this->record = $this->resolveRecord($record); static::authorizeResourceAccess(); } }Did something change is a recent update in which the instructions have not been updated to reflect? am I missing something?
12 replies