Save PIREP route to ACARS data table #102
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user