Parent is a reserved keyword in php. It refers to the parent class.
The code is an example of what I am trying to do, not the actually code i'm using.
$p = Parent::find(1);
$child = new Child([
'key' => 'value',
]);
$p->child()->save($child);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community