How to use a Checkbox to edit fields in a related model

I've got a simple has-one relationship in my User model which relates to a UserFeatures model, which has various fields that I'd like to edit with checkboxes in my UserResource:
    public function userFeatures(): HasOne
    {
        return $this->hasOne(UserFeatures::class, 'user_id');
    }


I've tried to do this using 'dot' notation to form a path, where feature_field is one of the fields in UserFeatures, like so:
  Checkbox::make('userFeatures.feature_field'),

However, this always returns a state of null.

So how can one create checkboxes to edit values in a 'has-one' related model?
Was this page helpful?