Browse Source

Enable model guarding after doing seeds

Leaving models unguarded can cause all kinds of havoc if someone uses seeds in their tests.
Best to default to reguard after doing the seeds.
Peter Haza 9 years ago
parent
commit
03a27fa0b2
1 changed files with 2 additions and 0 deletions
  1. 2 0
      database/seeds/DatabaseSeeder.php

+ 2 - 0
database/seeds/DatabaseSeeder.php

@@ -15,5 +15,7 @@ class DatabaseSeeder extends Seeder
         Model::unguard();
 
         // $this->call('UserTableSeeder');
+        
+        Model::reguard();
     }
 }