manojhl
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.2 replies
Troubleshooting $search variable accessibility in Select Field modifyQueryUsing() method
According to the document, the $search variable should be accessible within
https://filamentphp.com/docs/3.x/forms/fields/select#customizing-the-relationship-query
Customizing the relationship query You may customize the database query that retrieves options using the third parameter of theI tried adding $search in therelationship()
method: If you would like to access the current search query in themodifyQueryUsing
function, you can inject$search
.
modifyQueryUsing
but i got an error
An attempt was made to evaluate a closure for [Filament\Forms\Components\Select], but [$search] was unresolvable.
$search
parameter should be accessible inside the modifyQueryUsing()
method, right? am i missing something or is this a bug?2 replies
Is there a method to disable select row (checkbox) and display just the table with actions, filters
Currently i'm hiding the checkbox prefixed with each row with css but is there an offical way to remove this checkboxes from table table row.
Something i can configure in table method in a resource?
4 replies
How to exclude a Model's attribute(object) to be passed to filament livewire component by default
I'm trying to build a admin interface for https://github.com/spatie/laravel-uptime-monitor and i got the error
I presume this is due to the package has these function in the
Monitor
model converting url attribute to Url object.
But i've no idea how to ignore this or deal with this in filamentphp and need some assistance. Thank you1 replies