How to share a resource infolist
Let me explain the relationship structure and the current issue:
Resource Relationships:
-
JobPostResource
is the parent resource
- JobApplicationResource
is a child resource of JobPostResource
(indicated by public static string $parentResource = JobPostResource::class;
)
- OutsourcingListResource
(Talent) is related to 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:
Current Issue:
- In the infolist, we're trying to display Talent information within a Job Application like $infolist->getRecord()->talent)
by reusing TalentResources::infolist()
inside JobApplicationResource::infolist()
how can i reuse TalentResource::getTalentProfile()
inside JobApplicationResource
. How do i pass the talent
data inside the getTalentProfile()
method.1 Reply
3 approaches are to either build quite a complicated array building function, and loop your data in. Using mainly placeHolders and the like.
Or, use the relationship and repeatable entries.
Or, you could put a table widget in with your talent details.