Match Flight and Pirep ident attributes (#1342)
* Flight ident change * Pirep ident change * Update Pirep.php
This commit is contained in:
parent
9956929df7
commit
571768b39d
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user