title: how to paginate object array laravel?
body: <p>when i try to paginate results passed from the logged in user I get the error:</p>
  
  <pre><code>$message = Auth::user()-&gt;Notifications()-&gt;orderBy('created_at', 'desc')-&gt;get()
          -&gt;groupBy(function($date) {
              return Carbon::parse($date-&gt;created_at)-&gt;format('M d'); // grouping by day
          })
          -&gt;paginate(2);
  </code></pre>
  
  <p>Call to undefined method Illuminate\Database\Eloquent\Collection::paginate()</p>
  
  <p>what is the problem and how can I paginate my object array?</p>