How disable global scopes in RepeatableEntry

What I am trying to do: Show histories from warehouse transfer model without global scopes. code:

RepeatableEntry::make('warehouses')
->label(__('Registers'))
->schema([
TextEntry::make('product.name')
->label(__('Name')),
TextEntry::make('pivot.quantity')
->label(__('Quantity'))
->translateLabel(), TextEntry::make('batch_number')
->translateLabel()
])


RepeatableEntry::make('warehouses')
->label(__('Registers'))
->schema([
TextEntry::make('product.name')
->label(__('Name')),
TextEntry::make('pivot.quantity')
->label(__('Quantity'))
->translateLabel(), TextEntry::make('batch_number')
->translateLabel()
])

No description
No description
No description
No description
1 Reply
Daniel
DanielOP7d ago
I corrected it with this code inside the resource :

public static function getEloquentQuery(): Builder
{
return parent::getEloquentQuery()
->withoutGlobalScopes()
->with([
'warehouses' => function ($query) {
$query->withoutGlobalScopes();
},
]);
}

public static function getEloquentQuery(): Builder
{
return parent::getEloquentQuery()
->withoutGlobalScopes()
->with([
'warehouses' => function ($query) {
$query->withoutGlobalScopes();
},
]);
}
Want results from more Discord servers?
Add your server