@omnifyjp/ts 2.1.6 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -585,9 +585,10 @@ function buildFileAccessors(properties, propertyOrder, modelNamespace) {
|
|
|
585
585
|
/**
|
|
586
586
|
* Get ${propName} file (collection: ${collection}).
|
|
587
587
|
*/
|
|
588
|
-
public function ${methodName}():
|
|
588
|
+
public function ${methodName}(): MorphOne
|
|
589
589
|
{
|
|
590
|
-
return $this->
|
|
590
|
+
return $this->morphOne(File::class, 'fileable')
|
|
591
|
+
->where('collection', '${collection}');
|
|
591
592
|
}`);
|
|
592
593
|
}
|
|
593
594
|
}
|