Skip to content

Commit 19fe9fb

Browse files
committed
Merge pull request #23 from rkgrep/use-htmlstring
Use HtmlString instead of deprecated Expression
2 parents c6626d4 + 8f0fbd8 commit 19fe9fb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Misc/ViewExpressionTrait.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
namespace Arrilot\Widgets\Misc;
44

5-
use Illuminate\View\Expression;
5+
use Illuminate\Support\HtmlString;
66

77
trait ViewExpressionTrait
88
{
99
/**
10-
* Convert a given html to View Expression object that was introduced in Laravel 5.1.
10+
* Convert a given html to HtmlString object that was introduced in Laravel 5.1.
1111
*
1212
* @param string $html
1313
*
14-
* @return \Illuminate\View\Expression|string
14+
* @return \Illuminate\Support\HtmlString|string
1515
*/
1616
protected function convertToViewExpression($html)
1717
{
18-
if (interface_exists('Illuminate\Contracts\Support\Htmlable') && class_exists('Illuminate\View\Expression')) {
19-
return new Expression($html);
18+
if (interface_exists('Illuminate\Contracts\Support\Htmlable') && class_exists('Illuminate\Support\HtmlString')) {
19+
return new HtmlString($html);
2020
}
2121

2222
return $html;

0 commit comments

Comments
 (0)