get the generated IDs from the middle of the sha1 hash

This commit is contained in:
Nabeel Shahzad
2018-01-02 11:23:38 -06:00
parent 080e8842ac
commit 93786835af
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ $factory->define(App\Models\Pirep::class, function (Faker $faker) {
static $raw_data;
return [
'id' => substr($faker->unique()->sha1, 0, 12),
'id' => substr($faker->unique()->sha1, 28, 12),
'airline_id' => function () { # OVERRIDE THIS IF NEEDED
return factory(App\Models\Airline::class)->create()->id;
},