model.beforeGetAttribute

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

Called before the model attribute is retrieved

Example usage:

$model->bindEvent('model.beforeGetAttribute', function ((string) $key) use (\October\Rain\Database\Model $model) {
    if ($key === 'not-for-you-to-look-at') {
        return 'you are not allowed here';
    }
});