| @@ 147-159 (lines=13) @@ | ||
| 144 | * @param $time |
|
| 145 | * @return Carbon |
|
| 146 | */ |
|
| 147 | public function getCreatedAtAttribute($time) |
|
| 148 | { |
|
| 149 | return new class($time) extends Carbon implements Arrayable |
|
| 150 | { |
|
| 151 | public function toArray() |
|
| 152 | { |
|
| 153 | return [ |
|
| 154 | 'date' => $this->toIso8601String(), |
|
| 155 | 'timezone' => $this->timezone, |
|
| 156 | ]; |
|
| 157 | } |
|
| 158 | }; |
|
| 159 | } |
|
| 160 | } |
|
| @@ 90-102 (lines=13) @@ | ||
| 87 | * @param $time |
|
| 88 | * @return Carbon |
|
| 89 | */ |
|
| 90 | public function getCreatedAtAttribute($time) |
|
| 91 | { |
|
| 92 | return new class($time) extends Carbon implements Arrayable |
|
| 93 | { |
|
| 94 | public function toArray() |
|
| 95 | { |
|
| 96 | return [ |
|
| 97 | 'date' => $this->toIso8601String(), |
|
| 98 | 'timezone' => $this->timezone, |
|
| 99 | ]; |
|
| 100 | } |
|
| 101 | }; |
|
| 102 | } |
|
| 103 | } |
|
| 104 | ||