Skip to content

Commit

Permalink
Merge pull request #1639 from lloricode/bugfix/illuminate-date
Browse files Browse the repository at this point in the history
Use Illuminate\Support\Carbon for TTLs laravel 5.8 (PSR-16)
  • Loading branch information
specialtactics authored Mar 20, 2019
2 parents bc61105 + 8b110c4 commit 80030ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"dingo/blueprint": "^0.2",
"illuminate/routing": "^5.5",
"illuminate/support": "^5.5",
"league/fractal": "^0.17",
"laravel/framework": "^5.5"
"league/fractal": "^0.17"
},
"require-dev": {
"phpdocumentor/reflection-docblock": "3.3.2",
Expand Down
3 changes: 2 additions & 1 deletion src/Http/RateLimit/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Dingo\Api\Http\RateLimit;

use Dingo\Api\Http\Request;
use Illuminate\Support\Carbon;
use Illuminate\Cache\CacheManager;
use Illuminate\Support\Collection;
use Illuminate\Container\Container;
Expand Down Expand Up @@ -185,7 +186,7 @@ protected function key($key)
*/
protected function cache($key, $value, $minutes)
{
$this->cache->add($this->key($key), $value, now()->addMinutes($minutes));
$this->cache->add($this->key($key), $value, Carbon::now()->addMinutes($minutes));
}

/**
Expand Down

0 comments on commit 80030ad

Please sign in to comment.