Skip to content

Commit

Permalink
Fix TableBlueprint.php docblocks (#55)
Browse files Browse the repository at this point in the history
Update of examples in foreignKeys. They accept arguments "columns" and "foreignKeys" which are type of array but example is type of string in both arguments
  • Loading branch information
Anry7794 authored Dec 5, 2023
1 parent 3687783 commit d12f436
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/TableBlueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function dropIndex(array $columns): self

/**
* Example:
* $table->addForeignKey('user_id', 'users', 'id', ['delete' => 'CASCADE']);
* $table->addForeignKey(['user_id'], 'users', ['id'], ['delete' => 'CASCADE']);
*
* @param string $foreignTable Database isolation prefix will be automatically added.
*/
Expand All @@ -133,7 +133,7 @@ public function addForeignKey(

/**
* Example:
* $table->alterForeignKey('user_id', 'users', 'id', ['delete' => 'NO ACTION']);
* $table->alterForeignKey(['user_id'], 'users', ['id'], ['delete' => 'NO ACTION']);
*/
public function alterForeignKey(
array $columns,
Expand All @@ -154,7 +154,7 @@ public function alterForeignKey(

/**
* Example:
* $table->dropForeignKey('user_id');
* $table->dropForeignKey(['user_id']);
*/
public function dropForeignKey(array $columns): self
{
Expand Down

0 comments on commit d12f436

Please sign in to comment.