Hi,
I am trying to add an attribute to an existing model linked to a database.
For example, I get this when I get the attributes of the model:
Array ( [0] => id [1] => name )
I can manually edit existing attributes with the function afterFetch in the model:
public function afterFetch() { $this->name = "test"; }
Without needing to add a field in my database, I would add an attribute to the model.
I tried the following code:
public function afterFetch() { $this->ref = "test"; }
But without success, the attribute ref isn't added.
Is it possible?
Could you help me?
Thank you.