diff --git a/app/Models/Airport.php b/app/Models/Airport.php index 2045973b..ad792c98 100644 --- a/app/Models/Airport.php +++ b/app/Models/Airport.php @@ -88,10 +88,20 @@ class Airport extends BaseModel } /** + * Shorthand for getting the timezone * @return string */ public function getTzAttribute(): string { return $this->timezone; } + + /** + * Shorthand for setting the timezone + * @param $value + */ + public function setTzAttribute($value) + { + $this->attributes['timezone'] = $value; + } } diff --git a/app/Models/User.php b/app/Models/User.php index bbf48344..afc667dd 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -93,14 +93,23 @@ class User extends Authenticatable } /** - * Return the timezone - * @return mixed + * Shorthand for getting the timezone + * @return string */ - public function getTzAttribute() + public function getTzAttribute(): string { return $this->timezone; } + /** + * Shorthand for setting the timezone + * @param $value + */ + public function setTzAttribute($value) + { + $this->attributes['timezone'] = $value; + } + /** * @param mixed $size Size of the gravatar, in pixels * @return string