Skip to content
This repository was archived by the owner on Nov 24, 2019. It is now read-only.

Commit 9630cfe

Browse files
author
rennokki
authored
Using Carbon instead of Laravel'ls now()
1 parent 592e319 commit 9630cfe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Traits/RequestTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Rennokki\Larafy\Traits;
44

5+
use Carbon\Carbon;
56
use Rennokki\Larafy\Exceptions\SpotifyAPIException;
67
use Rennokki\Larafy\Exceptions\SpotifyAuthorizationException;
78

@@ -149,7 +150,7 @@ protected function generateClientCredentialsToken()
149150
$response = json_decode($request->getBody());
150151

151152
$this->clientCredentialsToken = $response->access_token;
152-
$this->clientCredentialsExpirationDate = now()->addSeconds($response->expires_in);
153+
$this->clientCredentialsExpirationDate = Carbon::now()->addSeconds($response->expires_in);
153154

154155
return $this;
155156
}

0 commit comments

Comments
 (0)