Skip to content

Commit d8a5db5

Browse files
authored
Clean up insert data doc example
Signed-off-by: Matthew Peveler <[email protected]>
1 parent 656e129 commit d8a5db5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/en/migrations.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,15 @@ insert methods in your migrations.
284284
*/
285285
public function up()
286286
{
287+
$table = $this->table('status');
288+
287289
// inserting only one row
288290
$singleRow = [
289291
'id' => 1,
290292
'name' => 'In Progress'
291293
];
292294
293-
$table = $this->table('status');
294-
$table->insert($singleRow);
295-
$table->saveData();
295+
$table->insert($singleRow)->saveData();
296296
297297
// inserting multiple rows
298298
$rows = [
@@ -306,7 +306,7 @@ insert methods in your migrations.
306306
]
307307
];
308308
309-
$table('status')->insert($rows)->save();
309+
$table->insert($rows)->saveData();
310310
}
311311
312312
/**

0 commit comments

Comments
 (0)