Undo casting time types to Time object #189
This commit is contained in:
@@ -114,26 +114,26 @@ class Flight extends BaseModel
|
||||
/**
|
||||
* @return Time
|
||||
*/
|
||||
public function getFlightTimeAttribute()
|
||||
/*public function getFlightTimeAttribute()
|
||||
{
|
||||
if (!array_key_exists('flight_time', $this->attributes)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Time($this->attributes['flight_time']);
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*/
|
||||
public function setFlightTimeAttribute($value)
|
||||
/*public function setFlightTimeAttribute($value)
|
||||
{
|
||||
if ($value instanceof Time) {
|
||||
$this->attributes['flight_time'] = $value->getMinutes();
|
||||
} else {
|
||||
$this->attributes['flight_time'] = $value;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Relationship
|
||||
|
||||
Reference in New Issue
Block a user