'boolean', ]; public function video() { return $this->belongsTo(StudioPlusVideo::class, 'studio_plus_video_id', 'id'); } public function getThumbnailUrlAttribute($value) { //if ($this->video->upload_status !== StudioPlusVideo::UPLOAD_STATUS_COMPLETE && str_contains($value, 'temp')) { if (strpos($value, 'temp') !== false) { return asset("storage/$value"); } else if (strpos($value, 'pendinguploadthumbnail')) { return $value; } else { $bucketName = Config::get('studioplus.bucket_name'); $value = Str::remove('wticreatorhub/', $value); return Config::get('studioplus.google_api_endpoint') . "/$bucketName/$value"; } } }