Chrollo
Chrollo
FFilament
Created by Chrollo on 5/24/2024 in #❓┊help
How to Display Data in Database to a Repeater - Custom Filament Page
Hello, I'm new in filament and I'm trying to build a custom page using form builder and repeater, but it seems that I can't figure out how to pass the database values to a repeater, tried using foreach but it doesn't seem to work below is the code for reference. It returns an empty value on the repeater ... // the widget public function mount($record): void { $this->pritems = PurchaseRequestItem::findOrFail($record); $this->form->fill([ 'purchase_request_items' => $this->pritems,
]); } ... // rest of widget Repeater::make('purchase_request_items') ->required() ->relationship(name:'purchaseRequestItems') ->schema([])
2 replies