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

Commit 792bca1

Browse files
committed
Fixing token insert
1 parent c95e010 commit 792bca1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Youtube.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ private function setup(Google_Client $client)
307307
public function saveAccessTokenToDB($accessToken)
308308
{
309309
return DB::table('youtube_access_tokens')->insert([
310-
'access_token' => $accessToken,
311-
'created_at' => Carbon::createFromTimestamp(json_decode($accessToken)->created)
310+
'access_token' => json_encode($accessToken),
311+
'created_at' => Carbon::createFromTimestamp($accessToken['created'])
312312
]);
313313
}
314314

0 commit comments

Comments
 (0)