From fe30850568aa19d580e577eda05050e6cd1c23af Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 16 Jan 2016 21:32:36 +0100 Subject: [PATCH] Fixed some database migration stuff. --- app/Models/Component.php | 10 ++++++++++ database/seeds/DatabaseSeeder.php | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/Models/Component.php b/app/Models/Component.php index c7edc8dca4..3cdf904b4f 100644 --- a/app/Models/Component.php +++ b/app/Models/Component.php @@ -9,4 +9,14 @@ use Illuminate\Database\Eloquent\Model; */ class Component extends Model { + protected $fillable = ['user_id', 'name', 'class']; + + /** + * @return array + */ + public function getDates() + { + return ['created_at', 'updated_at', 'deleted_at']; + } + } diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index fa57be20b1..46ffc02a88 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -23,14 +23,14 @@ class DatabaseSeeder extends Seeder $this->call('PermissionSeeder'); // set up basic test data (as little as possible): - if (App::environment() == 'testing') { + if (App::environment() == 'testing' && gethostname() != 'lightning') { $this->call('TestDataSeeder'); } // this one is reserved for more extensive testing. - //if (App::environment() == 'testing' || App::environment() == 'homestead' || gethostname() == 'lightning') { - //$this->call('VisualTestDataSeeder'); - //} + if (App::environment() == 'testing' || gethostname() == 'lightning') { + $this->call('VisualTestDataSeeder'); + } } }