Skip to content

Commit 26d1dd2

Browse files
Merge pull request #177 from arman-arif/main
Debug - fix #174
2 parents 3efbadd + 909c80e commit 26d1dd2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Traits/RendersContent.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,21 @@
88

99
trait RendersContent
1010
{
11-
protected $contentColumn = 'content';
1211

1312
public function render(string $column = null): string
1413
{
15-
$column = $column ?: $this->contentColumn;
14+
$column = $column ?: $this->getContentColumn();
1615
$renderer = app(ContentRenderer::class);
1716
$content = $this->$column;
1817
return $renderer->render(is_string($content) ? $content : '');
1918
}
19+
20+
protected function getContentColumn()
21+
{
22+
if (property_exists($this, 'contentColumn')) {
23+
return $this->contentColumn;
24+
}
25+
26+
return 'content';
27+
}
2028
}

0 commit comments

Comments
 (0)