Delete Item in Repeater
Hi All,
When I tried to implement deletable in my Repeater, I wanted to make a condition if this item's addable_id is 1, return false; other wise return true. I did this, but it is not working for me
->deletable(fn (array $state): ?string => $addable_id['name'] == 1 ?? false),
Anu help please
5 Replies
? something liek that
let me try
I did this, but it is not working for meDid you try some debugging? Any errors? You use
$addable_id
which looks undefined
What data is passed in as $state
?I passed $state['addable_id] but it undefined when I use dd($state) it return the full object with education as list because I useed the repater with relationship and bind profile model
$state['addable_id] is in education which is in the relationship
Can you try: