model.beforeRelation

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

Called when a new instance of a related model is created

Example usage:

$model->bindEvent('model.beforeRelation', function (string $relationName, \Illuminate\Database\Eloquent\Relations\Relation $relatedObject) use (\October\Rain\Database\Model $model) {
    // Implement scope
    $relatedObject->withLocked();
});