Skip to content

Commit 1e76a51

Browse files
Merge pull request #1262 from suraj-webkul/activity-issues
fix issue while save activity.
2 parents bb728a6 + ef3a39b commit 1e76a51

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

packages/Webkul/Activity/src/Models/Activity.php

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,31 @@
99

1010
class Activity extends Model implements ActivityContract
1111
{
12+
/**
13+
* Define table name of property
14+
*
15+
* @var string
16+
*/
1217
protected $table = 'activities';
1318

14-
protected $with = ['file', 'user'];
19+
/**
20+
* Define relationships that should be touched on save
21+
*
22+
* @var array
23+
*/
24+
protected $with = [
25+
'file',
26+
'user',
27+
];
1528

16-
protected $dates= [
17-
'schedule_from',
18-
'schedule_to',
29+
/**
30+
* Cast attributes to date time
31+
*
32+
* @var array
33+
*/
34+
protected $casts = [
35+
'schedule_from' => 'datetime',
36+
'schedule_to' => 'datetime',
1937
];
2038

2139
/**

0 commit comments

Comments
 (0)