Wrong render in view with Paginator handing 2 queries
<p>im trying merge 2 queries, and after paginate that new variable:</p>

<pre><code>$a = Message::where('conversation_id',$id)-&gt;where('user_id',$user-&gt;id)-&gt;where('s_1',1)
        -&gt;orderBy('created_at','DESC')-&gt;get();
    $b = Message::where('conversation_id',$id)-&gt;where('user_id',$conversation-&gt;recipients()-&gt;last()-&gt;user-&gt;id)-&gt;where('s_2',1)
        -&gt;orderBy('created_at','DESC')-&gt;get();
    $result = $a-&gt;merge($b);

    $messages = new Paginator($result, $result-&gt;count(), 1, 1);
</code></pre>

<p>work the foreach on the view, but the render is wrong and dont paginate, display all the results in only one page:</p>

<pre><code>&lt;table class="table table-hover"&gt;
            @foreach($messages as $i =&gt; $message)
            &lt;tr&gt;
                &lt;td&gt;
                    &lt;img src="{{$avatar[$message-&gt;user-&gt;username]}}" class="aoi pull-left"  /&gt;
                    &lt;a href="{{route('profile',[$message-&gt;user-&gt;username])}}"&gt;{{ $message-&gt;user-&gt;name }}&lt;/a&gt; 
                    {{ $message-&gt;body }}
                &lt;/td&gt;
            &lt;/tr&gt;
            @endforeach
        &lt;/table&gt;
        {!! str_replace('/?', '?', $messages-&gt;render()) !!}
</code></pre>

<p>the messages var return the correct params, but dont work on view:</p>

<pre><code>{"total":2,"per_page":2,"current_page":1,"last_page":1,"next_page_url":null,"prev_page_url":null,"from":1,"to":2,"data":
</code></pre>

<p>on the url: /message/1?page=2 display the 2 rows as well as in /message/1 and dont paginate.</p>