Welcome Guest, Not a member yet? Register   Sign In
Using view_cell - I am not clearly getting how to do it
#3

So do you mean like this?
PHP Code:
<?php

namespace App\Cells;
use 
CodeIgniter\View\Cells\Cell;

class 
BlockCell
{

    private $blockModel;

    public function getBlock($bloc_name)
    {
        $this->blockModel model('BlockModel');
        
        
return $this->blockModel->asArray()
            ->where(['bloc_name' => $bloc_name])
            ->first();
    }



Then I run into
PHP Code:
CodeIgniter\View\Cell::renderSimpleClass(): Return value must be of type string, array returned  
Reply


Messages In This Thread
RE: Using view_cell - I am not clearly getting how to do it - by kcs - 08-30-2023, 04:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB