Open DanielKimmich opened 4 years ago
I have returned to topic and found the following solution. The following code must be added in all methods: Creating, Deleting, Restoring, Uddating.
foreach ($model->getTouchedRelations() as $relation) {
$model->$relation->{$model->getUpdatedByColumn()} = Auth::id();
$model->$relation->save();
}
I have successfully tested on Creating, Uddating.
regards
I have returned to topic and found the following solution. The following code must be added in all methods: Creating, Deleting, Restoring, Uddating.
foreach ($model->getTouchedRelations() as $relation) { $model->$relation->{$model->getUpdatedByColumn()} = Auth::id(); $model->$relation->save(); }
I have successfully tested on Creating, Uddating.
regards
I am new to laravel can you please guide me how and where to do this . Its urgent
The user in the parent table is not updated when the child record is modified. For the field "updated_at" if the date is updated
In the model the child table defines the attribute "touches".
regards