title: The Response content must be a string or object implementing __toString(), \"boolean\" given."
body: <p>I'm trying to return a rendered View using <code>Response::json</code> but I'm getting this error:</p>
  
  <pre><code>The Response content must be a string or object implementing __toString(), \"boolean\" given."
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>$posts = Post::where( ... )-&gt;orderBy( ... )-&gt;get();
  $data['posts'] = View::make("posts.partials.loadHome")-&gt;with("posts", $posts)-&gt;render();
  $data['msg'] = "ok";
  
  return Response::json($data);
  </code></pre>
  
  <p>If I <code>var_dump($data)</code> I get this:</p>
  
  <pre><code>&lt;pre class='xdebug-var-dump' dir='ltr'&gt;
  &lt;b&gt;array&lt;/b&gt; &lt;i&gt;(size=2)&lt;/i&gt;
    'posts' &lt;font color='#888a85'&gt;=&amp;gt;&lt;/font&gt; &lt;small&gt;string&lt;/small&gt; &lt;font color='#cc0000'&gt;'&amp;lt;div class=&amp;quot;post postGrid&amp;quot; data-id=&amp;quot;1864&amp;quot;&amp;gt;&amp;#10; &amp;lt;a target=&amp;#39;_blank&amp;#39; href=&amp;quot;http://objavi.net/posts/1864&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://objavi.net/&amp;quot; id=&amp;quot;imgWrap&amp;quot; data-original=&amp;quot;/thumbs/YAo4wFzIpl76.jpg&amp;quot; class=&amp;quot;lazy&amp;quot; alt=&amp;quot;Deset manje poznatih činjenica o Jozefu Staljinu&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;#10;  &amp;#10;   &amp;lt;div id=&amp;quot;bodyPreview&amp;quot;&amp;gt;&amp;#10;     &amp;#10;       &amp;lt;a target=&amp;#39;_blank&amp;#39; href=&amp;quot;http://objavi.net/posts/1864&amp;quot;&amp;gt;&amp;lt;h1 class=&amp;quot;previewTitle&amp;quot;&amp;gt;Deset manje poznatih činjenica o Jozefu Staljinu&amp;lt;/h1&amp;gt;&amp;lt;/a&amp;gt;&amp;#10;&amp;#10;     &amp;lt;h3 id=&amp;quot;postInfo&amp;quot;&amp;gt;&amp;#10;                         &amp;lt;a class=&amp;quot;paint&amp;quot; href=&amp;quot;/category/17&amp;quot;&amp;gt;zanimljivosti&amp;lt;/a&amp;gt;&amp;#10; '...&lt;/font&gt; &lt;i&gt;(length=12172)&lt;/i&gt;
    'msg' &lt;font color='#888a85'&gt;=&amp;gt;&lt;/font&gt; &lt;small&gt;string&lt;/small&gt; &lt;font color='#cc0000'&gt;'ok'&lt;/font&gt; &lt;i&gt;(length=2)&lt;/i&gt;
  &lt;/pre&gt;
  </code></pre>
  
  <p>This is <code>posts.partials.loadHome</code> view:</p>
  
  <pre><code>@foreach($posts as $post)
  
  &lt;div class="post postGrid" data-id="{{ $post-&gt;id }}"&gt;
      &lt;a target='_blank' href="{{ URL::action('PostsController@show', $post-&gt;id) }}"&gt;{{ HTML::image(null, $post-&gt;title, ["id" =&gt; "imgWrap", "data-original" =&gt; $post-&gt;getThumb(), "class" =&gt; "lazy"]) }}&lt;/a&gt;
  
      &lt;div id="bodyPreview"&gt;
  
          &lt;a target='_blank' href="{{ URL::action('PostsController@show', $post-&gt;id) }}"&gt;&lt;h1 class="previewTitle"&gt;{{ e($post-&gt;title) }}&lt;/h1&gt;&lt;/a&gt;
  
          &lt;h3 id="postInfo"&gt;
              @foreach($post-&gt;categories as $c)
                  &lt;a class="paint" href="/category/{{ $c-&gt;id }}"&gt;{{ $c-&gt;name }}&lt;/a&gt;
              @endforeach
          &lt;/h3&gt;
  
          &lt;h2 class="bodyPreview"&gt;{{ strip_tags(truncString($post-&gt;body, 160)) }}&lt;/h2&gt;
  
          &lt;div id="createdBy"&gt;
              &lt;a href="{{ URL::action('UsersController@show', $post-&gt;user()-&gt;first()-&gt;id) }}"&gt;
                  {{ HTML::image($post-&gt;user()-&gt;first()-&gt;getAvatar(), $post-&gt;user()-&gt;first()-&gt;username, ["width" =&gt; "32", "height" =&gt; "32"]) }}
  
                  {{{ $post-&gt;user()-&gt;first()-&gt;username }}}
              &lt;/a&gt;
              &lt;label id="timeAgo"&gt;{{ localDate($post-&gt;created_at); }}&lt;/label&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  @endforeach
  </code></pre>
  
  <p>I tested this on localhost and everything works fine. What could be the problem?</p>