model.afterRelation

Triggered in October\Rain\Database\Concerns\HasEvents.

Called when a new instance of a related model is created

Example usage:

$model->bindEvent('model.afterRelation', function (string $relationName, \October\Rain\Database\Model $relatedModel) use (\October\Rain\Database\Model $model) {
    // Transfer custom properties
    $relatedModel->isLocked = $model->isLocked;
});