Major refactoring and cleanup of ACARS/Pirep API

This commit is contained in:
Nabeel Shahzad
2018-01-28 11:12:13 -06:00
parent 77d0d2bcd0
commit 653ff2a104
16 changed files with 387 additions and 231 deletions

View File

@@ -4,8 +4,8 @@ use Faker\Generator as Faker;
$factory->define(App\Models\Acars::class, function (Faker $faker) {
return [
'id' => substr($faker->unique()->sha1, 28, 12),
'pirep_id' => '', # fill this out by
'id' => null,
'pirep_id' => null,
'log' => $faker->text(200),
'lat' => $faker->latitude,
'lon' => $faker->longitude,

View File

@@ -11,7 +11,7 @@ $factory->define(App\Models\Pirep::class, function (Faker $faker) {
static $raw_data;
return [
'id' => substr($faker->unique()->sha1, 28, 12),
'id' => null,
'airline_id' => function () { # OVERRIDE THIS IF NEEDED
return factory(App\Models\Airline::class)->create()->id;
},