Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #107 from satoved/satoved-patch-1
Browse files Browse the repository at this point in the history
Removed Carbon dependency to support Laravel 5.8
  • Loading branch information
joedawson authored Mar 5, 2019
2 parents cb7398c + 8856a99 commit cab3f37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"require": {
"php": "^7.0",
"illuminate/support": "^5.4",
"google/apiclient": "^2.2",
"nesbot/carbon": "^1.22"
"google/apiclient": "^2.2"
},
"require-dev": {
"orchestra/testbench": "~3.2",
Expand Down
3 changes: 1 addition & 2 deletions src/Youtube.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Dawson\Youtube;

use Exception;
use Carbon\Carbon;
use Google_Client;
use Google_Service_YouTube;
use Illuminate\Support\Facades\DB;
Expand Down Expand Up @@ -364,7 +363,7 @@ public function saveAccessTokenToDB($accessToken)
{
return DB::table('youtube_access_tokens')->insert([
'access_token' => json_encode($accessToken),
'created_at' => Carbon::createFromTimestamp($accessToken['created'])
'created_at' => (new DateTime())->setTimestamp($accessToken['created']),
]);
}

Expand Down

0 comments on commit cab3f37

Please sign in to comment.