On laravel 11 / nova 4 app I I have User model with method :
public function userProfile(): HasOne
{
return $this->hasOne(UserProfile::class);
}
and in UserProfile model :
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
and in userProfile editor page I added readonly element:
BelongsTo::make(name:'User', attribute:'user', resource:User::class)->readonly(),
to show user to which this UserProfile belongs to.
Next I need to mae a link to User editor, but I did not find any component which can be used as reference to related model which I define.
I checked some inputs, like 'https://nova.laravel.com/docs/v4/resources/fields#url-field' :
But did not find anything similar ... Are there some thing to such reference to related model ?