Issue/329 refactor seeding (#337)

* Fix Contracts class names

* Refactoring of the file seeds so it's not a mess

* StyleCI fixes
This commit is contained in:
Nabeel S
2019-08-05 08:27:53 -04:00
committed by GitHub
parent d4c172e734
commit 9f3ba05880
47 changed files with 548 additions and 394 deletions
@@ -1,16 +1,16 @@
<?php
use App\Contracts\Migration;
use App\Services\Installer\MigrationService;
use App\Services\Installer\SeederService;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsTable extends Migration
{
private $migrationSvc;
private $seederSvc;
public function __construct()
{
$this->migrationSvc = new MigrationService();
$this->seederSvc = app(SeederService::class);
}
/**
@@ -38,7 +38,7 @@ class CreateSettingsTable extends Migration
$table->timestamps();
});
$this->migrationSvc->syncAllSettings();
$this->seederSvc->syncAllSettings();
}
/**
@@ -28,21 +28,6 @@ class CreateRanksTable extends Migration
$table->unique('name');
});
/**
* Initial required data...
*/
$ranks = [
[
'id' => 1,
'name' => 'New Pilot',
'hours' => 0,
'acars_base_pay_rate' => 50,
'manual_base_pay_rate' => 25,
],
];
$this->addData('ranks', $ranks);
}
/**