@@ -7,33 +7,33 @@ |
||
| 7 | 7 | |
| 8 | 8 | class Info extends Model |
| 9 | 9 | { |
| 10 | - protected $guarded = []; |
|
| 11 | - protected $appends = [ |
|
| 12 | - 'startTime', |
|
| 13 | - ]; |
|
| 14 | - |
|
| 15 | - public function getStartTimeAttribute() |
|
| 16 | - { |
|
| 17 | - return new Carbon($this->attributes['startTime']); |
|
| 18 | - } |
|
| 19 | - |
|
| 20 | - public function getSessionIdAttribute() |
|
| 21 | - { |
|
| 22 | - return str_replace($this->accountId, '', $this->engagementId); |
|
| 23 | - } |
|
| 24 | - |
|
| 25 | - public function getMinutesAttribute() |
|
| 26 | - { |
|
| 27 | - return round($this->attributes['duration'] / 60, 2); |
|
| 28 | - } |
|
| 29 | - |
|
| 30 | - public function getSecondsAttribute() |
|
| 31 | - { |
|
| 32 | - return $this->attributes['duration']; |
|
| 33 | - } |
|
| 34 | - |
|
| 35 | - public function getHoursAttribute() |
|
| 36 | - { |
|
| 37 | - return round($this->minutes / 60, 2); |
|
| 38 | - } |
|
| 10 | + protected $guarded = []; |
|
| 11 | + protected $appends = [ |
|
| 12 | + 'startTime', |
|
| 13 | + ]; |
|
| 14 | + |
|
| 15 | + public function getStartTimeAttribute() |
|
| 16 | + { |
|
| 17 | + return new Carbon($this->attributes['startTime']); |
|
| 18 | + } |
|
| 19 | + |
|
| 20 | + public function getSessionIdAttribute() |
|
| 21 | + { |
|
| 22 | + return str_replace($this->accountId, '', $this->engagementId); |
|
| 23 | + } |
|
| 24 | + |
|
| 25 | + public function getMinutesAttribute() |
|
| 26 | + { |
|
| 27 | + return round($this->attributes['duration'] / 60, 2); |
|
| 28 | + } |
|
| 29 | + |
|
| 30 | + public function getSecondsAttribute() |
|
| 31 | + { |
|
| 32 | + return $this->attributes['duration']; |
|
| 33 | + } |
|
| 34 | + |
|
| 35 | + public function getHoursAttribute() |
|
| 36 | + { |
|
| 37 | + return round($this->minutes / 60, 2); |
|
| 38 | + } |
|
| 39 | 39 | } |