File tree 1 file changed +14
-9
lines changed
1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -68,13 +68,6 @@ abstract class Model extends BaseModel
68
68
*/
69
69
protected $ excludeFromIndexes = [];
70
70
71
- /**
72
- * A list of attributes to exclude from the default indexing strategy.
73
- *
74
- * @var null|CarbonInterval
75
- */
76
- protected $ expireAfter ;
77
-
78
71
/**
79
72
* The primary key for the datastore should be "id".
80
73
*
@@ -491,8 +484,10 @@ public function refresh()
491
484
*/
492
485
public function updateTimestamps ()
493
486
{
494
- if (null !== $ this ->expireAfter && $ this ->expireAfter instanceof CarbonInterval) {
495
- $ time = $ this ->freshTimestamp ()->add ($ this ->expireAfter );
487
+ $ expireAfter = $ this ->getExpireAfterInterval ();
488
+
489
+ if (null !== $ expireAfter && $ expireAfter instanceof CarbonInterval) {
490
+ $ time = $ this ->freshTimestamp ()->add ($ expireAfter );
496
491
497
492
$ expireAtColumn = $ this ->getExpireAtColumn ();
498
493
@@ -518,6 +513,16 @@ public function setExpireAt($value)
518
513
return $ this ;
519
514
}
520
515
516
+ /**
517
+ * Get the expiry interval for the record.
518
+ *
519
+ * @return null|CarbonInterval
520
+ */
521
+ public function getExpireAfterInterval ()
522
+ {
523
+ return null ;
524
+ }
525
+
521
526
/**
522
527
* Get the name of the "expire at" column.
523
528
*
You can’t perform that action at this time.
0 commit comments