how to fill data with RelationManager Associate
i have 2 models: Group and Unit.
Group.php
public function units(): HasMany
{
return $this->hasMany(Unit::class);
}
Unit.php
public function group(): BelongsTo
{
return $this->belongsTo(Group::class);
}
i created an UnitsRelationManager in GroupRessource and registered it getRalations.
and i have this in my table function
->headerActions([
Tables\Actions\AssociateAction::make()->preloadRecordSelect(),
])
i'm getting this error when i try to associate a record
Group.php
public function units(): HasMany
{
return $this->hasMany(Unit::class);
}
Unit.php
public function group(): BelongsTo
{
return $this->belongsTo(Group::class);
}
i created an UnitsRelationManager in GroupRessource and registered it getRalations.
and i have this in my table function
->headerActions([
Tables\Actions\AssociateAction::make()->preloadRecordSelect(),
])
i'm getting this error when i try to associate a record
