© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
7 replies
Boustrophedon

Show columns from relation on different connection?

I have tables that are related to each other on two different database connections (Integrating with a legacy system).
For simplicity, say there is
Users
Users
on one connection and
Posts
Posts
on the other. They are in a hasMany relation by
Users.id
Users.id
and
Posts.user_id
Posts.user_id
.
The Post model has
public function User(): BelongsTo {
    return $this->belongsTo(User::class, 'id', 'user_id');
}
public function User(): BelongsTo {
    return $this->belongsTo(User::class, 'id', 'user_id');
}

and the User model has
public function Posts(): HasMany {
    return $this->hasMany(Post::class, 'id', 'user_id');
}
public function Posts(): HasMany {
    return $this->hasMany(Post::class, 'id', 'user_id');
}

In the PostResource
table()
table()
I have a column
Tables\Columns\TextColumn::make('User.name')
Tables\Columns\TextColumn::make('User.name')

I am not seeing the
name
name
of the User, nor any errors.
Is it possible to show relationships over different database connections?
The
User
User
and
Post
Post
tables each do show their own data properly.
Am I doing something wrong in general?
Do I need a RelationshipManager? That seems overkill for just showing an item from the relation, I don't want to manage/edit/attach/detach/do other relationship operations.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Show columns based on filters
FilamentFFilament / ❓┊help
3y ago
Table from different database connection
FilamentFFilament / ❓┊help
3y ago
Wrong connection if model and relationship from different connections
FilamentFFilament / ❓┊help
11mo ago
Show/Hide Table Columns based on getTabs()
FilamentFFilament / ❓┊help
3y ago