|
@@ 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 |
|
return $time->format('H:i'); |
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
/** |
| 113 |
|
* Accessor: Get the open time of the device converted to the users preferred time and |
|
@@ 134-143 (lines=10) @@
|
| 131 |
|
* @param string $value |
| 132 |
|
* @return string |
| 133 |
|
*/ |
| 134 |
|
public function getCloseTimeAttribute($value) |
| 135 |
|
{ |
| 136 |
|
$time = new Carbon($value, 'UTC'); |
| 137 |
|
|
| 138 |
|
//If the user is logged in then use there preferred timezone |
| 139 |
|
if (Auth::check()) |
| 140 |
|
$time = $time->setTimezone(Auth::user()->timezone); |
| 141 |
|
|
| 142 |
|
return $time->format('H:i'); |
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
/** |
| 146 |
|
* Accessor: Get the close time of the device converted to the users preferred time and |