Skip to content

Commit 9043828

Browse files
committed
act time accessor
1 parent d5613dd commit 9043828

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Models/ModelAction.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ public function getExtraProperty(string $propertyName): mixed
4646
return Arr::get($this->properties->toArray(), $propertyName);
4747
}
4848

49+
public function getActTimeAttribute(): string
50+
{
51+
return $this->act_at->toTimeString();
52+
}
53+
4954
public function scopeToActBetween($query, Carbon $start, Carbon $end)
5055
{
5156
return $query->whereBetween('act_at', [$start->toTimeString(), $end->toTimeString()]);

0 commit comments

Comments
 (0)