Add first pass of pirep import; additional fields in flight/pirep tables #114
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user