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

The BlockCell does not have the asArray() method.
So "Call to undefined method App\Cells\BlockCell::asArray()".

It seems you areĀ  confusing the Cell class with the Model class.
If you want to get the result of the Model, you need to call the Model's method in the Cell class.
See the sample code: https://codeigniter4.github.io/CodeIgnit...mple-cells
The $this->blogModel is used in that code.
Of course you need to assign the model instance by yourself like:

PHP Code:
// ...
private $blogModel;

// ...
$this->blogModel model('BlogModel'); 
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB