How to get relationship value using Get $get unititlity?

Hi, I'm trying to set the value of a field, from a relationship when action clicked. My code looks like this:

Action::make('Name')
->tooltip('Insert accommodation name')
->action(function (Set $set, Get $get, $state) {
    $set('seo_title', $get('type.name'));
}),

$get('type.name') does not work.
Was this page helpful?