Skip to content

Commit 80030ad

Browse files
Merge pull request dingo#1639 from lloricode/bugfix/illuminate-date
Use Illuminate\Support\Carbon for TTLs laravel 5.8 (PSR-16)
2 parents bc61105 + 8b110c4 commit 80030ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"dingo/blueprint": "^0.2",
1818
"illuminate/routing": "^5.5",
1919
"illuminate/support": "^5.5",
20-
"league/fractal": "^0.17",
21-
"laravel/framework": "^5.5"
20+
"league/fractal": "^0.17"
2221
},
2322
"require-dev": {
2423
"phpdocumentor/reflection-docblock": "3.3.2",

src/Http/RateLimit/Handler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Dingo\Api\Http\RateLimit;
44

55
use Dingo\Api\Http\Request;
6+
use Illuminate\Support\Carbon;
67
use Illuminate\Cache\CacheManager;
78
use Illuminate\Support\Collection;
89
use Illuminate\Container\Container;
@@ -185,7 +186,7 @@ protected function key($key)
185186
*/
186187
protected function cache($key, $value, $minutes)
187188
{
188-
$this->cache->add($this->key($key), $value, now()->addMinutes($minutes));
189+
$this->cache->add($this->key($key), $value, Carbon::now()->addMinutes($minutes));
189190
}
190191

191192
/**

0 commit comments

Comments
 (0)