expires_atをCarbon化
This commit is contained in:
parent
ca5be696c8
commit
72ec5d8d26
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace App\MetadataResolver;
|
namespace App\MetadataResolver;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
class KomifloResolver implements Resolver
|
class KomifloResolver implements Resolver
|
||||||
{
|
{
|
||||||
public function resolve(string $url): Metadata
|
public function resolve(string $url): Metadata
|
||||||
@ -22,7 +24,7 @@ class KomifloResolver implements Resolver
|
|||||||
' - ' .
|
' - ' .
|
||||||
($json['content']['parents'][0]['data']['title'] ?? '?');
|
($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->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;
|
return $metadata;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user