title: pagination shows all the result , despite using paginator helper and pagination Cakephp 3.x
body: <p>So i am new to <strong>Cakephp 3.x</strong> , and i am trying to paginate a set of data , but the problem is all the entries are being displayed , also the navigation bar in the bottom is showing, and i guess it's working fine.</p>
  
  <p>Below is my controller.</p>
  
  <pre><code>public $paginate = ['limit' =&gt; 2,'order' =&gt; ['sample.posts' =&gt; 'asc']];
  
  public function initialize()
  {
      parent::initialize();
      $this-&gt;layout = 'frontend';
      $this-&gt;loadComponent('Paginator');
      $this-&gt;loadComponent('Flash'); // Include the FlashComponent
  }
  
  public function index()
  {
      $this-&gt;set('Posts', $this-&gt;paginate());
      $posts = $this-&gt;Posts-&gt;find('all');
      $this-&gt;set(compact('posts'));
  }
  </code></pre>
  
  <p>And this is my template file.</p>
  
  <pre><code>&lt;table&gt;
          &lt;tr&gt;paginate
              &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('ID', 'id'); ?&gt;&lt;/th&gt;
              &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('Title', 'title'); ?&gt;&lt;/th&gt;
          &lt;/tr&gt;
             &lt;?php foreach($posts as $post): ?&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;?php echo $post['id'] ?&gt; &lt;/td&gt;
              &lt;td&gt;&lt;?php echo $post['title'] ?&gt; &lt;/td&gt;
          &lt;/tr&gt;
      &lt;?php endforeach; ?&gt;
  &lt;/table&gt;
  
  &lt;?php echo $this-&gt;Paginator-&gt;numbers(); ?&gt;  
  &lt;?php echo $this-&gt;Paginator-&gt;prev('« Previous', array('class' =&gt; 'disabled')); ?&gt;
  &lt;?php echo $this-&gt;Paginator-&gt;next('Next »', array('class' =&gt; 'disabled')); ?&gt;   
  &lt;?php echo $this-&gt;Paginator-&gt;counter(); ?&gt;
  </code></pre>
  
  <p>any help will be really appreciated.</p>