title: How to merge collection and Query builder then use paginate on it Laravel 8
body: <p>I have a builder object and a collection and i want to combine them and use paginate of laravel.</p>
  <p>How can i do that ?</p>
  <pre><code>public function getRequests(){
          $closedRequests = request::join('request_logs', 'request_logs.request_id', '=', 'requests.id')
                      -&gt;select(&quot;requests.id&quot;, &quot;requests.user_id&quot;, &quot;requests.form_type&quot;, &quot;requests.created_at&quot;, &quot;requests.request_status&quot;)
                      -&gt;whereNotIn('request_status', [-2, 0])
                      -&gt;where('request_logs.user_id', Auth::user()-&gt;id);
  
          $processingRequests = request::select(&quot;requests.id&quot;, &quot;requests.user_id&quot;, &quot;requests.form_type&quot;, &quot;requests.created_at&quot;, &quot;requests.request_status&quot;)
                           -&gt;where('request_status', 0)
                           -&gt;get()
                           -&gt;filter(function ($request) {
                                 return FormsController::checkUserPermissionToConsultForm($request, true);
  
          });
          $closedRequests = $closedRequests-&gt;union($processingRequests)
                              -&gt;orderBy('created_at', 'desc')
                              -&gt;paginate(5);
          return $closedRequests;
      }
  </code></pre>
  <p>The function above is what i tried to do but it generate an error saying</p>
  <pre><code>Call to a member function getBindings() on array
  </code></pre>