0

I have two tables Advisors and AdvisorRegions and the relation looks like this. One advisorRegion has many advisors and one advisor has one advisorRegion.

Now I want to show the name of the advisorRegion in the advisors-resource table.

I have the advisors_region_id as an foreign key in my advisor table

How do i do this in filament php v3.

I tried to look it up but found nothng interesting at all.

Olivier
  • 13,283
  • 1
  • 8
  • 24
stevan06
  • 57
  • 4
  • "I tried to look it up but found nothng interesting at all." - really? you should start from what you tried to do, and post any code in the question that may help people help you. read this https://stackoverflow.com/help/how-to-ask – Caribou Aug 25 '23 at 11:25

1 Answers1

1

From the Displaying data from relationships section of the docs:

TextColumn::make('advisorsRegion.name');

Where advisorsRegion is the name of the relationship in your model

Vivick
  • 3,434
  • 2
  • 12
  • 25