Add first pass of pirep import; additional fields in flight/pirep tables #114

This commit is contained in:
Nabeel Shahzad
2018-01-29 18:14:55 -06:00
parent 5c164e2cf6
commit a5f51f6264
10 changed files with 206 additions and 30 deletions

View File

@@ -25,10 +25,8 @@ trait HashId
{
parent::boot();
static::creating(function ($model) {
$key = $model->getKeyName();
if (empty($model->{$key})) {
$id = static::createNewHashId();
$model->{$key} = $id;
if (empty($model->id)) {
$model->id = static::createNewHashId();
}
});
}