© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•11mo ago•
1 reply
manojhl 🇮🇳

How to share a resource infolist

Let me explain the relationship structure and the current issue:

Resource Relationships:
-
JobPostResource
JobPostResource
is the parent resource
-
JobApplicationResource
JobApplicationResource
is a child resource of
JobPostResource
JobPostResource
(indicated by
public static string $parentResource = JobPostResource::class;
public static string $parentResource = JobPostResource::class;
)
-
OutsourcingListResource
OutsourcingListResource
(Talent) is related to
JobApplication
JobApplication
through a relationship

Data Flow:
- A Job Post can have multiple Job Applications
- Each Job Application is associated with one Talent (OutsourcingList)
- The relationship path is: JobPost -> JobApplication -> Talent


Relationship Structure:
   JobPost
   └── JobApplications (has many)
       └── Talent (belongs to)
   JobPost
   └── JobApplications (has many)
       └── Talent (belongs to)


Current Issue:
- In the infolist, we're trying to display Talent information within a Job Application like
$infolist->getRecord()->talent)
$infolist->getRecord()->talent)
by reusing
TalentResources::infolist()
TalentResources::infolist()
inside
JobApplicationResource::infolist()
JobApplicationResource::infolist()



class TalentResource extends Resource
{
   public static function getTalentProfile()
   {
      return \Filament\Infolists\Components\Section::make([
        TextEntry::make('fullname'),
        TextEntry::make('email'),
        TextEntry::make('phone'),
        // ...... (5+ entries)
      ]);
   }
   public static function infolist(Infolist $infolist): Infolist
    {
        return $infolist
            ->schema([
               self::getTalentProfile(),
            ]);
    }
}

class JobApplicationResource extends Resource
{
    public static function infolist(Infolist $infolist): Infolist
    {
        return $infolist
            ->schema([
              TextEntry::make('status')->badge(),
              TextEntry::make('talent.fullname'), // works
              ... 
            ]);
    }
}
class TalentResource extends Resource
{
   public static function getTalentProfile()
   {
      return \Filament\Infolists\Components\Section::make([
        TextEntry::make('fullname'),
        TextEntry::make('email'),
        TextEntry::make('phone'),
        // ...... (5+ entries)
      ]);
   }
   public static function infolist(Infolist $infolist): Infolist
    {
        return $infolist
            ->schema([
               self::getTalentProfile(),
            ]);
    }
}

class JobApplicationResource extends Resource
{
    public static function infolist(Infolist $infolist): Infolist
    {
        return $infolist
            ->schema([
              TextEntry::make('status')->badge(),
              TextEntry::make('talent.fullname'), // works
              ... 
            ]);
    }
}



how can i reuse
TalentResource::getTalentProfile()
TalentResource::getTalentProfile()
inside
JobApplicationResource
JobApplicationResource
. How do i pass the
talent
talent
data inside the
getTalentProfile()
getTalentProfile()
method.
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

How to add a repeating infolist to show all records from a resource?
FilamentFFilament / ❓┊help
3y ago
Share a resource with new panel
FilamentFFilament / ❓┊help
2y ago
Reuse Infolist in other resource
FilamentFFilament / ❓┊help
2y ago
How to show a slideover infolist view when clicking a row in a resource table?
FilamentFFilament / ❓┊help
2y ago