We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 656e129 commit d8a5db5Copy full SHA for d8a5db5
docs/en/migrations.rst
@@ -284,15 +284,15 @@ insert methods in your migrations.
284
*/
285
public function up()
286
{
287
+ $table = $this->table('status');
288
+
289
// inserting only one row
290
$singleRow = [
291
'id' => 1,
292
'name' => 'In Progress'
293
];
294
- $table = $this->table('status');
- $table->insert($singleRow);
295
- $table->saveData();
+ $table->insert($singleRow)->saveData();
296
297
// inserting multiple rows
298
$rows = [
@@ -306,7 +306,7 @@ insert methods in your migrations.
306
]
307
308
309
- $table('status')->insert($rows)->save();
+ $table->insert($rows)->saveData();
310
}
311
312
/**
0 commit comments