Skip to content

Commit d3aa167

Browse files
author
Ilya Sakovich
committed
adds __toString() method to the SharedData class
1 parent b774927 commit d3aa167

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/SharedData.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,9 @@ public function render()
6262
{
6363
return '<script>window[\''.$this->getNamespace().'\'] = '.$this->toJson().';</script>';
6464
}
65+
66+
public function __toString()
67+
{
68+
return $this->render();
69+
}
6570
}

0 commit comments

Comments
 (0)