【问题标题】:Render and Bootstrap Laravel 4渲染和引导 Laravel 4
【发布时间】:2016-06-04 22:19:22
【问题描述】:

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

$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 会返回给我这个错误:

在非对象上调用成员函数 append_child()

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

【问题讨论】:

    标签: php twitter-bootstrap laravel


    【解决方案1】:

    试试下面的:

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

    它会给你字符串中的视图

    【讨论】:

      猜你喜欢
      • 2014-10-25
      • 2015-06-07
      • 2016-12-10
      • 1970-01-01
      • 1970-01-01
      • 2016-01-30
      • 2020-06-25
      • 2017-10-11
      • 2021-01-21
      相关资源
      最近更新 更多