expires_atをCarbon化

This commit is contained in:
eai04191 2019-01-17 06:07:21 +09:00
parent ca5be696c8
commit 72ec5d8d26

View File

@ -2,6 +2,8 @@
namespace App\MetadataResolver;
use Carbon\Carbon;
class KomifloResolver implements Resolver
{
public function resolve(string $url): Metadata
@ -22,7 +24,7 @@ class KomifloResolver implements Resolver
' - ' .
($json['content']['parents'][0]['data']['title'] ?? '?');
$metadata->image = $json['content']['cdn_public'] . "/564_mobile_large_3x/" . $json['content']['named_imgs']['cover']['filename'] . $json['content']['signature'];
$metadata->expires_at = date('Y-m-d H:i:s', strtotime($json['content']['signature_expires']));
$metadata->expires_at = Carbon::parse($json['content']['signature_expires']);
return $metadata;
} else {