2016-02-23 83 views
0

我使用渲染将刀片转换为字符串并附加为pdf内容。渲染和引导Laravel 4

$html = View::make('tpl',compact('aa','bb'))->render(); 

每当我添加的引导链接或刀片任何其他链接,

<head> 
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> 
</head> 

laravel会回到我这个错误:

Call to a member function append_child() on a non-object

为什么,以及如何解决这个问题?我使用Laravel 4.2

回答

0

尝试以下:

$html = View::make('tpl',compact('aa','bb'))->__toString();

它会给你在字符串中的视图

+0

同样的错误返回。 – hahahaha

+0

你可以显示你的布局和tpl代码吗? –