Include
To include one or more related resources in your response, use the include()
method.
$response = $client
->include('friends')
->get('/users');
default
/users?include=friends
json api
/users?include=friends
odata
/users?$expand=friends
Include Multiple Resources
You can also request an array of related resources to be included.
$response = $client
->include(['friends', 'jobs', 'hobbies'])
->get('/users');
default
/users?include=friends,jobs,hobbies
json api
/users?include=friends,jobs,hobbies
odata
/users?$expand=friends,jobs,hobbies