Save PIREP route to ACARS data table #102

This commit is contained in:
Nabeel Shahzad
2018-01-01 13:48:02 -06:00
parent 216d686cc7
commit b456dc1a71
16 changed files with 258 additions and 43 deletions

View File

@@ -18,9 +18,23 @@ class Navdata extends BaseModel
];
public $casts = [
'id' => 'string',
'type' => 'integer',
'lat' => 'float',
'lon' => 'float',
'freq' => 'float',
];
protected static function boot()
{
parent::boot();
/**
* Make sure the ID is all caps
*/
static::creating(function (Navdata $model) {
if (!empty($model->id)) {
$model->id = strtoupper($model->id);
}
});
}
}