# Updating Resources
You can allow resources to be updated (opens new window) using the updatable and notUpdatable methods on the schema builder.
Optionally pass a closure that returns a boolean value.
$type->updatable();
$type->updatable(function (Context $context) {
return $context->getRequest()->getAttribute('user')->isAdmin();
});
# Events
# onUpdating
Run before the model is saved.
$type->onUpdating(function (&$model, Context $context) {
// do something
});
# onUpdated
Run after the model is saved.
$type->onUpdated(function (&$model, Context $context) {
// do something
});