I once had similar, it's basically a double one to many. In my case I had Loads with children: picks and drops.
Apr 14, 2021
3
How save records on tables with Parent->child->child relationship
Let's say I have three tables.
table A
--------------------
id
description
table b
--------------------
id
a_id
description
table c
--------------------
id
b_id
description
Whenever I do
$a->save();
$a->b()->save();
$a->c()->save();
I get the error BadMethodCallException with message 'Call to undefined method Illuminate\Database\Eloquent\Relations\HasManyThrough::save()'
My a model have a hasManyThrough(C, B) relationship;
Please or to participate in this conversation.