Hello everybody, I am pretty sure that my problem has simple and fast solution but I can’t find it.
I have two tables, Countries table and Dir117s table, i.e:
How to write my index.php template for the Dir117s table so that I could see country name instead of country id?
In fact, a Country belongs to many Dir117s and each Dir117s consignee_country_id and consignor_country_id has a Country. Can I defin associations like as follows:
Thank you so much, @larsgw ! That is exactly what I needed. Everything works as it should. If anybody had similar problem, the solution contiue as follows.
Based on @larsgw solution, I modified my Dir117sController.php as follows: