Set hours to read-only once they've changed away from PENDING #167

This commit is contained in:
Nabeel Shahzad
2018-02-06 12:58:48 -06:00
parent ac0058e951
commit 531c7ddba3
9 changed files with 94 additions and 59 deletions

View File

@@ -99,6 +99,16 @@ class Pirep extends BaseModel
return $flight_id;
}
/**
* Do some cleanup on the route
* @param $route
*/
public function setRouteAttribute($route)
{
$route = strtoupper(trim($route));
$this->attributes['route'] = $route;
}
/**
* Check if this PIREP is allowed to be updated
* @return bool