title: Codeigniter 4 constructor, not able to use data in other functions
body: <p>It's been a little while since I've worked with constructors in CI. I've looked at the userguide for CI4, and constructors seem to be a bit different to CI3. I've copied the code and trialled it, but I get an error message: <code>Cannot call constructor</code>.</p>
  
  <pre><code>    public function __construct(...$params)
      {
          parent::__construct(...$params);
  
          $model = new ShopModel();
  
          $findAll = [
              'shop' =&gt; $model-&gt;table('shop')-&gt;where('brand_name_slug', 'hugo-boss')-&gt;findAll()
          ];
      }
  </code></pre>
  
  <p>From here, I've searched online and saw a similar thread which advised removing the <code>parent::__construct(...$params);</code> line altogether. When I do this, the page loads - but the $findAll array is NULL when I try to call it in the Controller function I need it for:</p>
  
  <pre><code>    public function brand_name($brand_name_slug)
      {
          $model = new ShopModel();
  
          var_dump($findAll['shop']);
  
          $data = [
              'shop' =&gt; $findAll['shop'],
          ];
  
          echo view('templates/header', $data);
          echo view('shop/view', $data);
          echo view('templates/footer', $data);
      }
  </code></pre>
  
  <p>Advice or pointers greatly appreciated!</p>