F
Filament10mo ago
krkmo

How can I hide or show the relationship manager based on a query?

When editing a student I need to hide or show TransportationRelationManager::class, if the active field is false or true.
public static function getRelations(): array
{
return [
TransportationRelationManager::class,
MedicalHistoryRelationManager::class,
TutorsRelationManager::class,
SchoolUniformRelationManager::class

];
}
public static function getRelations(): array
{
return [
TransportationRelationManager::class,
MedicalHistoryRelationManager::class,
TutorsRelationManager::class,
SchoolUniformRelationManager::class

];
}
1 Reply
SirAlyon
SirAlyon10mo ago
Not an expert here, but did you try to access Model $record inside that method?
Want results from more Discord servers?
Add your server