Truncate the fieldset table and pivot table on seed as well

This commit is contained in:
snipe 2017-11-22 15:57:05 -08:00
parent 77076e02e8
commit b9d102a5fb

View file

@ -1,6 +1,7 @@
<?php
use Illuminate\Database\Seeder;
use App\Models\CustomField;
use App\Models\CustomFieldset;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
@ -21,6 +22,8 @@ class CustomFieldSeeder extends Seeder
}
}
CustomField::truncate();
CustomFieldset::truncate();
DB::table('custom_field_custom_fieldset')->truncate();
factory(CustomField::class, 4)->create();
}