Add shorthands for timezone to tz
This commit is contained in:
parent
1cc999a4f9
commit
56bf277fe0
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user