Realtion is not displayed

Hello everyone, strangely enough, my relationship is not displayed: TenantResource:
public static function getRelations(): array
{
return [
UsersRelationManager::class
];
}
public static function getRelations(): array
{
return [
UsersRelationManager::class
];
}
UsersRelationManager:
class UsersRelationManager extends RelationManager
{
protected static string $relationship = 'users';

public function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('email')
->required()
->maxLength(255),
]);
}

public function table(Table $table): Table
{
return $table
->recordTitleAttribute('email')
->columns([
Tables\Columns\TextColumn::make('email'),
])
->filters([
Tables\Filters\TrashedFilter::make()
])
->headerActions([
Tables\Actions\CreateAction::make(),
])
->actions([
Tables\Actions\EditAction::make(),
Tables\Actions\DeleteAction::make(),
Tables\Actions\ForceDeleteAction::make(),
Tables\Actions\RestoreAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
Tables\Actions\RestoreBulkAction::make(),
Tables\Actions\ForceDeleteBulkAction::make(),
]),
])
->modifyQueryUsing(fn(Builder $query) => $query->withoutGlobalScopes([
SoftDeletingScope::class,
]));
}
}
class UsersRelationManager extends RelationManager
{
protected static string $relationship = 'users';

public function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('email')
->required()
->maxLength(255),
]);
}

public function table(Table $table): Table
{
return $table
->recordTitleAttribute('email')
->columns([
Tables\Columns\TextColumn::make('email'),
])
->filters([
Tables\Filters\TrashedFilter::make()
])
->headerActions([
Tables\Actions\CreateAction::make(),
])
->actions([
Tables\Actions\EditAction::make(),
Tables\Actions\DeleteAction::make(),
Tables\Actions\ForceDeleteAction::make(),
Tables\Actions\RestoreAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
Tables\Actions\RestoreBulkAction::make(),
Tables\Actions\ForceDeleteBulkAction::make(),
]),
])
->modifyQueryUsing(fn(Builder $query) => $query->withoutGlobalScopes([
SoftDeletingScope::class,
]));
}
}
Tenant:
public function users(): HasMany
{
return $this->hasMany(User::class);
}
public function users(): HasMany
{
return $this->hasMany(User::class);
}
Does anyone know what could be causing this?
0 Replies
No replies yetBe the first to reply to this messageJoin