Repeater

how can we fill repeater with prebuild data on create page ex:
protected static string $resource = InvoiceResource::class;
//order hasMany OrderItems => relation name orderItems
//invoice hasMany OrderItems => relation name orderItems
$order = Order::get()->first();
$items= $order->orderItems(); // relation order hasMany orderItems
public function mount(): void
{
parent::mount();
if($order){
//fill my repeater with items here
}
}
protected static string $resource = InvoiceResource::class;
//order hasMany OrderItems => relation name orderItems
//invoice hasMany OrderItems => relation name orderItems
$order = Order::get()->first();
$items= $order->orderItems(); // relation order hasMany orderItems
public function mount(): void
{
parent::mount();
if($order){
//fill my repeater with items here
}
}
my process is 1- create an order with order_items=> (id_order, id_article, quantity, unit_price, invoice_id) then send it to our supplier invoice_id =>null 2-when we get a supplier invoice we generate this one from order and we we each orderItems with updating invoice_id, and unit_price
0 Replies
No replies yetBe the first to reply to this messageJoin