expires_atをCarbon化
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user