File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Closure ;
6
6
use ArrayAccess ;
7
- use DateInterval ;
8
7
use DateTimeInterface ;
9
8
use BadMethodCallException ;
10
9
use Illuminate \Support \Carbon ;
14
13
use Illuminate \Cache \Events \CacheMissed ;
15
14
use Illuminate \Support \Traits \Macroable ;
16
15
use Illuminate \Cache \Events \KeyForgotten ;
16
+ use Illuminate \Support \InteractsWithTime ;
17
17
use Illuminate \Contracts \Events \Dispatcher ;
18
18
use Illuminate \Contracts \Cache \Repository as CacheContract ;
19
19
20
20
class Repository implements CacheContract, ArrayAccess
21
21
{
22
+ use InteractsWithTime;
22
23
use Macroable {
23
24
__call as macroCall;
24
25
}
@@ -483,9 +484,7 @@ public function offsetUnset($key)
483
484
*/
484
485
protected function getMinutes ($ duration )
485
486
{
486
- if ($ duration instanceof DateInterval) {
487
- $ duration = Carbon::now ()->add ($ duration );
488
- }
487
+ $ duration = $ this ->parseDateInterval ($ duration );
489
488
490
489
if ($ duration instanceof DateTimeInterface) {
491
490
$ duration = Carbon::now ()->diffInSeconds (Carbon::createFromTimestamp ($ duration ->getTimestamp ()), false ) / 60 ;
You can’t perform that action at this time.
0 commit comments