Closed fahmifitu closed 4 years ago
have you set up the relationships in the models?
in the column declaration, you'd use something like country.name
, notice the period. please see the docs.
You also may need to use ->select('banks.*')
on your query.
->select('banks.*')
This did the trick! Thanks for the response.
Bank: id name country_id
Country: id name
Sorting by Country name breaks the data in table and loads data of country into bank columns that has the same name (eg: id, name, created_at, updated_at, etc..)