Open

Description
I have a problem with yajra datatables. I`m following this
https://datatables.yajrabox.com/eloquent/relationships
But not working, if like this.
Example :
$account = People::with(['users.profile.country.state'])
Datatable::of($account)->make(true);
.....
columns : [
{name: 'users.profile.name', data: 'users.profile.name'},
{name: 'users.profile.country.state.name', data: 'users.profile.country.state.name'},
]
....
when I want to sortable users.profile.country.state.name I get error in query. "version for the right syntax to use near '.name" or "Call to a member function getRelation() on string"
thank.
UPDATE
sample (table like that):
// Table
- people :
id
id_user
name
- users
id
username
password
- profile
id
id_user
name
id_country
- country
id
name
- state
id
id_country
name