how to load relationship() on Forms\Components\Fieldset conditionally?
The form uses
Forms\Components\Fieldset::relationship('primaryAddress')
to load a related 'address' record of an user. but sometimes the user may not have the related address yet. In this case, it shows Target [Illuminate\Database\Eloquent\Model] is not instantiable.
error. Is there an way to load the related 'address' record condtionally?
I tried , but I still get the error. thank you for your insights.0 Replies