sirking
sirking
FFilament
Created by sirking on 10/9/2024 in #❓┊help
related select filters
How do I create a related select filters? I want to display the chapters related only to the course
->filters([
Tables\Filters\SelectFilter::make('course_id')
->relationship('course', 'name')
->selectablePlaceholder(false)
->label('Course')
->preload(),
Tables\Filters\SelectFilter::make('chapter_id')
->relationship(
'chapter',
'name',
function(Builder $query, Get $get) {
info($get('../course_id'));
$query->where('course_id', $get('course_id'));
}
),
], layout: FiltersLayout::AboveContent)
->filters([
Tables\Filters\SelectFilter::make('course_id')
->relationship('course', 'name')
->selectablePlaceholder(false)
->label('Course')
->preload(),
Tables\Filters\SelectFilter::make('chapter_id')
->relationship(
'chapter',
'name',
function(Builder $query, Get $get) {
info($get('../course_id'));
$query->where('course_id', $get('course_id'));
}
),
], layout: FiltersLayout::AboveContent)
4 replies
FFilament
Created by sirking on 9/9/2024 in #❓┊help
Is there a way to programmatically add item to a repeater?
I have a section with a repeater. The section also has a header action. When the action button is click, im doing something in the background and then create an item in the repeater. Could someone point me to the right direction. TIA!
9 replies
FFilament
Created by sirking on 9/9/2024 in #❓┊help
I can't add an image on RichText on a RelashipManager modal form. Help Pls
3 replies
FFilament
Created by sirking on 8/10/2024 in #❓┊help
Open related resource from action in a repeater
Hi! I'm trying to open a new tab with the related records by clicking on the an extraItemActions on Repeater. I have Course->Sections->Page hierarchy. I have added Section in CourseResource as a Repeater. Then added an extraItemAction on it. I want to open the Table of Pages that relates only to the Section.. Could someone please point me in the right direction on how to do this?
1 replies