Skip to content

Commit e3a29bf

Browse files
committed
bugfix: name conflict on template model
1 parent 2aa6b8a commit e3a29bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Models/Contracts/Template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @property ?\Carbon\CarbonInterface $updated_at
1515
* @property-read \Illuminate\Database\Eloquent\Collection<Model & Templateable> $templateable
1616
* @property-read \Illuminate\Database\Eloquent\Collection<Model & DocumentType> $documentTypes
17-
* @property-read \Illuminate\Database\Eloquent\Collection<Model & Content> $content
17+
* @property-read \Illuminate\Database\Eloquent\Collection<Model & Content> $contents
1818
*/
1919
interface Template extends HasDtoModel
2020
{
@@ -33,7 +33,7 @@ public function documentTypes();
3333
/**
3434
* @return \Illuminate\Database\Eloquent\Relations\MorphToMany
3535
*/
36-
public function content();
36+
public function contents();
3737

3838
/**
3939
* Initialize the template with the given theme.

src/Models/Template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function documentTypes()
2727
return $this->morphedByMany(InspireCmsConfig::getDocumentTypeModelClass(), 'templateable', InspireCmsConfig::getTemplateableTableName());
2828
}
2929

30-
public function content()
30+
public function contents()
3131
{
3232
return $this->morphedByMany(InspireCmsConfig::getContentModelClass(), 'templateable', InspireCmsConfig::getTemplateableTableName());
3333
}

0 commit comments

Comments
 (0)