F
Filament12mo ago
jay02k

Creating another View page

how exactly this work if you already have existing view? if you register it to your getpages() 'view' => Pages\ViewCustomer::route('/{record}'), // existing view 'view-contact' => Pages\ViewCustomerContact::route('/{record}/contact'), how will you make the page and link that page? Is this correct cause i try and it's not working Tables\Actions\Action::make('contact')
7 Replies
DrByte
DrByte12mo ago
i try and it's not working
What do you mean by "it's not working"? Does the whole page turn green or something? (of course not, but you obviously tried to do something, like click on a link, and it maybe took you someplace unintended, or gave an error message (what's the error message?), or wasn't even clickable. Etc.
Please describe more.
jay02k
jay02kOP12mo ago
clicable but dont go anywhere, it dont load any page
awcodes
awcodes12mo ago
Action::make(‘contact’)
->url(CustomerResource::getUrl(‘view-contact’, [‘record’ => $this->record])
Action::make(‘contact’)
->url(CustomerResource::getUrl(‘view-contact’, [‘record’ => $this->record])
Don’t have enough to give accurate code but that’s the idea.
jay02k
jay02kOP12mo ago
do i also need to create contact.blade.php for the vuew psge?
awcodes
awcodes12mo ago
If you used the artisan command it should already be there. But yes, custom pages need a corresponding blade view.
jay02k
jay02kOP12mo ago
yes i already create a filament page and i can manually check it here http://0.0.0.0/admin/report-purchase-order the blade file is: report-purchase-order.blade.php but how can i do the link? i try this but not working Tables\Actions\Action::make() ->url(ReportPurchaseOrder::getUrl('report-purchase-order', ['record' => $this->record])) this the error "App\Filament\Resources\ReportPurchaseOrder" not found and this is my page file ReportPurchaseOrder.php
krekas
krekas12mo ago
I would guess wrong namespace for reportpurchaseorder
Want results from more Discord servers?
Add your server