Skip to content

Commit 0b9f479

Browse files
author
Lloric Mayuga Garcia
committed
.
Signed-off-by: Lloric Mayuga Garcia <[email protected]>
1 parent 1d15690 commit 0b9f479

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/LaravelHtmlTableGenerator.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ private function _header(array $header)
7474
{
7575
$output = $this->_tags['head'];
7676

77-
if(!is_null($this->_caption))
78-
{
79-
$output = "$output<caption>{$this->_caption}</caption>";
80-
}
81-
8277
$output .= $this->_tags['head_row'];
8378

8479
foreach($header as $row)
@@ -217,6 +212,12 @@ private function _attributeToString($param)
217212
private function _generate(array $header, $model_or_array, $limit = NULL,array $fields = NULL)
218213
{
219214
$output = $this->_generateOpenTag();
215+
216+
if(!is_null($this->_caption))
217+
{
218+
$output .= "$output<caption>{$this->_caption}</caption>";
219+
}
220+
220221
$output .= $this->_header($header);
221222
if(is_array($model_or_array))
222223
{

0 commit comments

Comments
 (0)