Skip to content

Commit d12f436

Browse files
authored
Fix TableBlueprint.php docblocks (#55)
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
1 parent 3687783 commit d12f436

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/TableBlueprint.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function dropIndex(array $columns): self
110110

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

134134
/**
135135
* Example:
136-
* $table->alterForeignKey('user_id', 'users', 'id', ['delete' => 'NO ACTION']);
136+
* $table->alterForeignKey(['user_id'], 'users', ['id'], ['delete' => 'NO ACTION']);
137137
*/
138138
public function alterForeignKey(
139139
array $columns,
@@ -154,7 +154,7 @@ public function alterForeignKey(
154154

155155
/**
156156
* Example:
157-
* $table->dropForeignKey('user_id');
157+
* $table->dropForeignKey(['user_id']);
158158
*/
159159
public function dropForeignKey(array $columns): self
160160
{

0 commit comments

Comments
 (0)