Skip to content

Commit 96c3b89

Browse files
committed
act time setters
1 parent 8e8f05c commit 96c3b89

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/Traits/FluentUpdate.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Devsrv\ScheduledAction\Enums\Status;
66
use Illuminate\Support\Collection;
7+
use Carbon\Carbon;
78

89
trait FluentUpdate
910
{
@@ -35,6 +36,25 @@ public function markAsDispatched()
3536
return $this;
3637
}
3738

39+
public function setActOn(Carbon $carbon)
40+
{
41+
$this->act_on = $carbon->toDateString();
42+
$this->act_at = $carbon->toTimeString();
43+
return $this;
44+
}
45+
46+
public function setActDate(Carbon $carbon)
47+
{
48+
$this->act_on = $carbon->toDateString();
49+
return $this;
50+
}
51+
52+
public function setActTime(Carbon $carbon)
53+
{
54+
$this->act_at = $carbon->toTimeString();
55+
return $this;
56+
}
57+
3858
public function mergeExtraProperties($properties)
3959
{
4060
if(! $properties instanceof Collection) $properties = collect($properties);

0 commit comments

Comments
 (0)