Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filamentβ€’3y agoβ€’
6 replies
terumi

Custom page model instance

Hello people,
I made a new custom page for a filament resource with
php artisan make:filament-page ShowTicket --resource=TicketResource
php artisan make:filament-page ShowTicket --resource=TicketResource

And it created two files:
1. resources/views/filament/resources/ticket-resource/pages/show-ticket.blade.php, and
2. app/Filament/Resources/TicketResource/Pages/ShowTicket.php
1. resources/views/filament/resources/ticket-resource/pages/show-ticket.blade.php, and
2. app/Filament/Resources/TicketResource/Pages/ShowTicket.php


How can I pass now the instance of the model record whose view link I clicked?
I'm being redirected to tickets/{ticket_id} but I cannot find anywhere how I can show the ticket properties.

Any help would be greatly apreciated πŸ™‚
Solution
use \Filament\Resources\Pages\Concerns\InteractsWithRecord;
public function mount(int | string $record): void
{
    $this->record = $this->resolveRecord($record);
}
use \Filament\Resources\Pages\Concerns\InteractsWithRecord;
public function mount(int | string $record): void
{
    $this->record = $this->resolveRecord($record);
}
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel β€’ Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Custom Page Polymorphic Model Binding
FilamentFFilament / β“β”Šhelp
2y ago
Custom page model binding updated not working
FilamentFFilament / β“β”Šhelp
3y ago
how to call model inside custom page resource
FilamentFFilament / β“β”Šhelp
2y ago
Custom view page and display for relation model
FilamentFFilament / β“β”Šhelp
3y ago