Skip to content

Commit

Permalink
Added restrictOnDelete method to ForeignKeyDefinition class (#34752)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeElghali committed Oct 8, 2020
1 parent 4c6fa9c commit b138899
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Database/Schema/ForeignKeyDefinition.php
Expand Up @@ -34,6 +34,16 @@ public function cascadeOnDelete()
return $this->onDelete('cascade');
}

/**
* Indicate that deletes should be restricted.
*
* @return $this
*/
public function restrictOnDelete()
{
return $this->onDelete('restrict');
}

/**
* Indicate that deletes should set the foreign key value to null.
*
Expand Down

0 comments on commit b138899

Please sign in to comment.