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

Commit

Permalink
Merge pull request #11 from rennokki/fix-now-method
Browse files Browse the repository at this point in the history
Using Carbon instead of Laravel'ls now()
  • Loading branch information
rennokki committed Jan 30, 2019
2 parents 592e319 + 9630cfe commit d4dd2cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Traits/RequestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Rennokki\Larafy\Traits;

use Carbon\Carbon;
use Rennokki\Larafy\Exceptions\SpotifyAPIException;
use Rennokki\Larafy\Exceptions\SpotifyAuthorizationException;

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

$this->clientCredentialsToken = $response->access_token;
$this->clientCredentialsExpirationDate = now()->addSeconds($response->expires_in);
$this->clientCredentialsExpirationDate = Carbon::now()->addSeconds($response->expires_in);

return $this;
}
Expand Down

0 comments on commit d4dd2cb

Please sign in to comment.