diff --git a/app/Models/Flight.php b/app/Models/Flight.php index 621f1079..d81fcd92 100644 --- a/app/Models/Flight.php +++ b/app/Models/Flight.php @@ -136,7 +136,7 @@ class Flight extends Model } /** - * Get the flight ident, e.,g JBU1900 + * Get the flight ident, e.,g JBU1900/C.nn/L.yy */ public function getIdentAttribute(): string { @@ -144,11 +144,11 @@ class Flight extends Model $flight_id .= $this->flight_number; if (filled($this->route_code)) { - $flight_id .= '-'.$this->route_code; + $flight_id .= '/C.'.$this->route_code; } if (filled($this->route_leg)) { - $flight_id .= '-'.$this->route_leg; + $flight_id .= '/L.'.$this->route_leg; } return $flight_id; diff --git a/app/Models/Pirep.php b/app/Models/Pirep.php index 4a953e6c..c5050551 100644 --- a/app/Models/Pirep.php +++ b/app/Models/Pirep.php @@ -215,21 +215,19 @@ class Pirep extends Model } /** - * Get the flight ident, e.,g JBU1900 - * - * @return string + * Get the flight ident, e.,g JBU1900/C.nn/L.yy */ public function getIdentAttribute(): string { - //$flight_id = $this->airline->code; - $flight_id = $this->flight_number; + $flight_id = $this->airline->code; + $flight_id .= $this->flight_number; if (filled($this->route_code)) { - $flight_id .= '/C'.$this->route_code; + $flight_id .= '/C.'.$this->route_code; } if (filled($this->route_leg)) { - $flight_id .= '/L'.$this->route_leg; + $flight_id .= '/L.'.$this->route_leg; } return $flight_id;