Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsTo::save()

Hi! Hoping for some guidance. I can edit a form field and it will save no problem, but creating a new entry throws this error: Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsTo::save() Entry:
Forms\Components\TextInput::make('member_id'),`
Forms\Components\TextInput::make('member_id'),`
Model:
public function member(): BelongsTo
{
return $this->belongsTo(Member::class);
}
public function member(): BelongsTo
{
return $this->belongsTo(Member::class);
}
Thank you.
2 Replies
Dennis Koch
Dennis Kochβ€’11mo ago
Why is it a TextInput and not a Select with relationship()?
tommy_jeanslow
tommy_jeanslowOPβ€’11mo ago
I was using textinput just to test.. Thank you for the response Dennis πŸ™‚
Forms\Components\Select::make('member_id')
->relationship('member', 'full_name')
->searchable('full_name')
->label('Name'),
Forms\Components\Select::make('member_id')
->relationship('member', 'full_name')
->searchable('full_name')
->label('Name'),
Want results from more Discord servers?
Add your server