diff --git a/src/Illuminate/Database/Schema/ForeignKeyDefinition.php b/src/Illuminate/Database/Schema/ForeignKeyDefinition.php index 6682da30c81b..1ce0361b9377 100644 --- a/src/Illuminate/Database/Schema/ForeignKeyDefinition.php +++ b/src/Illuminate/Database/Schema/ForeignKeyDefinition.php @@ -34,6 +34,16 @@ public function restrictOnUpdate() return $this->onUpdate('restrict'); } + /** + * Indicate that updates should set the foreign key value to null. + * + * @return $this + */ + public function nullOnUpdate() + { + return $this->onUpdate('set null'); + } + /** * Indicate that updates should have "no action". *