F
Filament4mo ago
gremki

Pivot cast in relation manager

Hello! I have a BelongsToMany relationship with a pivot column and a coresponding RelationManager to attach/edit this relation. The create/save operation work fine but, on edit, the form is no longer filled with pivot data. The pivot is defined like this:
class DataPivot extends MorphPivot
{
protected $casts = [
'data' => AsArrayObject::class,
];
}
class DataPivot extends MorphPivot
{
protected $casts = [
'data' => AsArrayObject::class,
];
}
The only thing I could notice is that, if a do dd($data) in mutateRecordDataUsing, the pivot_data is string and not casted to array. Am I missing something here?
No description
1 Reply
gremki
gremki3mo ago
Does anyone have any idea? Is it a bug or I'm misusing the component?
Want results from more Discord servers?
Add your server