Unguard and reguard the database during the seeding process

This commit is contained in:
Kevin MacMartin 2016-04-05 14:27:59 -04:00
parent b6c1544013
commit 16b08b7ee1

View file

@ -1,6 +1,7 @@
<?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class DatabaseSeeder extends Seeder
{
@ -11,6 +12,7 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
Model::unguard();
Model::reguard();
}
}