@@ 101-110 (lines=10) @@ | ||
98 | * @param string $value |
|
99 | * @return string |
|
100 | */ |
|
101 | public function getOpenTimeAttribute($value) |
|
102 | { |
|
103 | $time = new Carbon($value, 'UTC'); |
|
104 | ||
105 | //If the user is logged in then use there preferred timezone |
|
106 | if (Auth::check()) { |
|
107 | $time = $time->setTimezone(Auth::user()->timezone); |
|
108 | } |
|
109 | ||
110 | return $time->format('H:i'); |
|
111 | } |
|
112 | ||
113 | /** |
|
@@ 135-144 (lines=10) @@ | ||
132 | * @param string $value |
|
133 | * @return string |
|
134 | */ |
|
135 | public function getCloseTimeAttribute($value) |
|
136 | { |
|
137 | $time = new Carbon($value, 'UTC'); |
|
138 | ||
139 | //If the user is logged in then use there preferred timezone |
|
140 | if (Auth::check()) { |
|
141 | $time = $time->setTimezone(Auth::user()->timezone); |
|
142 | } |
|
143 | ||
144 | return $time->format('H:i'); |
|
145 | } |
|
146 | ||
147 | /** |