Fixes for API and live map
This commit is contained in:
@@ -43,6 +43,7 @@ use PhpUnitsOfMeasure\Exception\NonStringUnitName;
|
||||
* @property Carbon created_at
|
||||
* @property Carbon updated_at
|
||||
* @property bool state
|
||||
* @property Acars position
|
||||
* @package App\Models
|
||||
*/
|
||||
class Pirep extends Model
|
||||
@@ -177,6 +178,19 @@ class Pirep extends Model
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block on time
|
||||
* @return Carbon
|
||||
*/
|
||||
public function getSubmittedAtAttribute()
|
||||
{
|
||||
if (array_key_exists('submitted_at', $this->attributes)) {
|
||||
return new Carbon($this->attributes['submitted_at']);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a new Length unit so conversions can be made
|
||||
* @return int|Distance
|
||||
|
||||
Reference in New Issue
Block a user