title: Eloquent paginate function in Slim 3 project using twig
body: <p>How can I use paginate function from Eloquent in Slim 3 project using twig ? </p>
  
  <p>This is in my controller : </p>
  
  <pre><code>$posts = Sound::paginate(2);
  
  $this-&gt;container-&gt;view-&gt;render($response, 'admin/sounds/index.twig', [
    'posts' =&gt; $posts
  ]);
  </code></pre>
  
  <p>This is the view :</p>
  
  <pre><code>{{ posts.links() }}
  </code></pre>
  
  <p>But it doesn't work as well as I expected :</p>
  
  <pre><code>Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in **PATH_TO_PROJECT**\vendor\illuminate\pagination\AbstractPaginator.php on line 412
  
  Fatal error: Call to a member function make() on null in **PATH_TO_PROJECT**\vendor\illuminate\pagination\LengthAwarePaginator.php on line 90
  </code></pre>
  
  <p>What I have to do to make it work ?</p>