Repeater Duplicate queries when adding new item
My question is the following, why? when you add a new item to the repeater it executes the ->visible in all the previously added items, this causes the queries to be duplicated.
Tnx !
Forms\Components\Repeater::make('invoiceItems')
->relationship()
->schema([
Forms\Components\Group::make() //
->schema([
Select::make('categories'),
Select::make('article_id'),
Select::make('glass')
->visible(fn (Get $get): bool => Article::where('id', $get('article_id'))->where('is_kit', '!=', '0')->exists()),Tnx !
